android-gallery

how to dim the current activity?

ε祈祈猫儿з 提交于 2019-12-22 23:58:16
问题 Is there a way to dim the Current activity when calling the new activity? as in the new activity should be above the previous activity. The new activity that i have is a gallery. It comes when the finish button in the previous activity is clicked. So i want this gallery to be placed above the previous activity 回答1: Try setting the background of your gallery Activity to a transparent color. You might need to create a custom theme and more details can be found here: http://developer.android.com

how to dim the current activity?

妖精的绣舞 提交于 2019-12-22 23:57:05
问题 Is there a way to dim the Current activity when calling the new activity? as in the new activity should be above the previous activity. The new activity that i have is a gallery. It comes when the finish button in the previous activity is clicked. So i want this gallery to be placed above the previous activity 回答1: Try setting the background of your gallery Activity to a transparent color. You might need to create a custom theme and more details can be found here: http://developer.android.com

How to change 'open' in gallery intent to 'done'?

谁都会走 提交于 2019-12-22 18:42:25
问题 I am using following intent to open gallery for picking multiple images and videos: Intent intent = new Intent(); intent.setType("image/* video/*"); intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(intent, "Select Images"), MULTIPLE_IMAGE_SELECT); When the gallery is opened it looks like In the top it says 'open' i want to change it to 'done' or 'ok', how to achieve that? Thanks. 回答1: When the gallery

Intent.ACTION_PICK behaves differently

蹲街弑〆低调 提交于 2019-12-20 05:56:47
问题 I am using following code to pick an image from the gallery. When I test it with Samsung Galaxy S4, it directly goes to Gallery that is what I want actually. BUT, when I test my code on LG Optimus II device, it shows a dialog gives an option to choose either Gallery or Picture. In other words, it adds one more layer which I do not want. Both devices have KitKat 4.4.2 operating system. public static void showFileChooser(Activity activity) { Intent intent = new Intent(); intent.setType("image/*

Bitmap - Out of memory exception

纵饮孤独 提交于 2019-12-20 03:53:24
问题 When I try to get image from camera or gallery, I get error. Here is a part of logcat: 06-27 05:51:47.297: E/dalvikvm-heap(438): Out of memory on a 35295376-byte allocation. 06-27 05:51:47.312: E/dalvikvm(438): Out of memory: Heap Size=108067KB, Allocated=71442KB, Limit=131072KB 06-27 05:51:47.312: E/dalvikvm(438): Extra info: Footprint=108067KB, Allowed Footprint=108067KB, Trimmed=56296KB 06-27 05:51:47.312: E/PowerManagerService(438): Excessive delay when setting lcd brightness: mLcdLight

saving image picked from gallery for future use

心不动则不痛 提交于 2019-12-20 02:29:32
问题 Hey i have been looking for a while now. the following code picks the image from the android gallery and shows it in an imageView. but heres the thing, everytime the app is closed and restarted the has to be picked again. i would like to know how i can edit the following to save the image for good in the imageView. @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == RESULT_LOAD

How to take screenshot of a layout in android

人盡茶涼 提交于 2019-12-20 02:04:12
问题 I want to save my frame layout into gallery by taking the screen shot of the layout. This code works on a project(Name: Trial), but when I tried the same code on othe project(Name: Fg), It did not work. The photo is not being saved in the Gallery. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_background); } public Bitmap click(View view) { FrameLayout memecontentView =(FrameLayout) findViewById(R.id.my);

Save image from ImageView to device gallery

自古美人都是妖i 提交于 2019-12-20 01:07:21
问题 I'm trying to save an image from ImageView to devices gallery. I tried this code Code Edit: URL url = new URL(getIntent().getStringExtra("imageURL")); File f = new File(url.getPath()); addImageToGallery(f.getPath(), this); public static void addImageToGallery(final String filePath, final Context context) { ContentValues values = new ContentValues(); values.put(MediaStore.Images.Media.DATE_TAKEN, System.currentTimeMillis()); values.put(MediaStore.Images.Media.MIME_TYPE, "image/jpeg"); values

Android Gallery fullscreen

谁都会走 提交于 2019-12-19 06:57:16
问题 How do I implement a fullscreen gallery? i.e. image stretches to fill all the screen? 回答1: To make it fullscreen: <activity android:name="YourActivity" android:theme="@android:style/Theme.NoTitleBar.Fullscreen"> To make the images fill the screen you should do it on your adapter, creating a View with MATCH_PARENT x MATCH_PARENT and in your ImageView you created on getView you should make it fill all the space: yourImageView.setScaleType(ImageView.ScaleType.FIT_XY); 回答2: Use this in Activity

Android: making gallery infinite loop of images

半城伤御伤魂 提交于 2019-12-19 04:55:23
问题 I'm using a gallery in my project in which I have added four images and I want it to be infinite from both right side and left side. How do I accomplish this? 回答1: The main idea is that in your getView method, you have to use position = position % imagesArray.length; if (position < 0) position = position + imagesArray.length; imagesArray is the array that holds the images in your res folder. For example: public class CircularGallery extends Activity { /** Called when the activity is first