gallery

Intent for getting multiple images

99封情书 提交于 2019-11-27 17:43:12
Is there an intent requesting to get multiple images? We are aware of Intent.ACTION_PICK or Intent.ACTION_GET_CONTENT for getting a single image. Also our app registers as IntentFilter for android.intent.action.SEND and android.intent.action.SEND_MULTIPLE However, we would like our app to make use of Gallery like applications to pick multiple images. Is there an intent for that? Bhavesh Hirpara I also wanted Intent for picking multiple images in android but I failed.I came across custom gallery with custom theme. Look at here MultipleImagePick to pick single image and to pick multiple image

Android - combine swipe and pinch-to-zoom

孤街醉人 提交于 2019-11-27 17:02:51
问题 We have the Gallery, which support swiping. We also have 3rd-party components that support pinch-to-zoom on ImageView, such as ImageViewTouch in ImageViewZoom. Now I would like to combine them both. The problem is that the swipe events get consumed by the ImageViewTouch and missed by the Gallery. How can consume events by both components? That would solve my problem, because, eventually, after a few events, each component will know how to react accordingly. For example, if the first event is

Android onActivityResult NEVER called

人盡茶涼 提交于 2019-11-27 16:23:01
my onActivityResult method is never called. am using android 2.2 I am using a Tabhost, where TabHosts contain TabGroups which contain individual Activities. One of my individual activity runs the following intent Intent intent = new Intent(); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(intent, "Select Picture"), 0); this loads my gallery apps, I use the default android gallery to select one image and when I return my onActivityResult is not called my activity. It looks like this - and I put a breakpoint at if(resultCode ==

How can I update the Android Gallery after a photo?

跟風遠走 提交于 2019-11-27 14:52:35
For the university i've to develop an application on android with the face detections. For this i've to save various photo on my gallery. The problem is that after saving the photo, the gallery do not update. More precisely, if I delete the directory where I'm going to save the image, I open the application and shoot the photo, then going into the gallery and after an "update" I see the photo. But once I have the directory, if I take a new picture, this did not overwrite the old one. Online i've found this: sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED,Uri.parse("file://" + Environment

Gallery has stopped while cropping image in kitkat Nexus7

只谈情不闲聊 提交于 2019-11-27 14:31:44
Problem: I am fetching image from gallery and after that cropped that image and its working perfect in all device. But it is giving me error while running in Nexus 7 kitkat since i have checked build version for it with "Gallery Stopped" error. I have implemented code and all other neccessary permission in manifest file still not getting response. So can anybody resolve this? Here is my Code: final String[] items = new String[] { "Take from camera", "Select from gallery" }; ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.select_dialog_item, items); AlertDialog

Android file delete leaves empty placeholder in Gallery

好久不见. 提交于 2019-11-27 13:37:48
I insert an image via: ContentValues values = new ContentValues(); values.put(Images.Media.TITLE, filename); values.put(Images.Media.DATE_ADDED, System.currentTimeMillis()); values.put(Images.Media.MIME_TYPE, "image/jpeg"); Uri uri = this.getContentResolver().insert(Images.Media.EXTERNAL_CONTENT_URI, values); But when I try to delete File f = new File(imageURI); f.delete(); The picture is no longer there but an empty placeholder is. Any ideas? Android has a cache of sorts that keeps track of media files. Try this: sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" +

Android: Programmatically animate between images in Gallery widget

只愿长相守 提交于 2019-11-27 13:16:41
问题 Note: As of Jellybean the gallery widget is deprecated. A ViewPager should be used instead. I'd like to programmatically move between images in the Gallery widget, with animation. I can change the currently displaying image using the setSelection(int position) method, however that does not animate. Then there's setSelection(int position, bool animate) but the extra boolean on the end there doesn't appear to do anything. In the source of Gallery it appears that it can handle DPAD key-presses,

How to implement an endless gallery in Android?

扶醉桌前 提交于 2019-11-27 12:14:45
I am using a gallery layout in my application. It is working when the user moves the pictures in the gallery from left to right (it is infinite that means elements are repeated again). But when the user moves from right to left and reaches the first element, it doesn't. After then no elements are coming. But I want to repeat elements from this side also. Can you give me some suggestions? Gallery g = (Gallery) findViewById(R.id.gallery); g.setAdapter(new ImageAdapter(this)); g.setFocusable(true); g.setSelection((int)(Integer.MAX_VALUE / 2) - (Integer.MAX_VALUE / 2)% mImageIds.length); g

Android: Refreshing the Gallery after saving new images

雨燕双飞 提交于 2019-11-27 11:57:54
So in my application I at one point save a bunch of images to a temporary folder, and I want them to show up immediately in the Gallery. Off of a reboot, they do, but otherwise they don't. I've tried using the sendBroadcast method: sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + Environment.getExternalStorageDirectory()))); But I get a permission error: E/AndroidRuntime( 2628): java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.MEDIA_MOUNTED from pid=2628, uid=10068 Could I be missing a permission in my

How to migrate from Gallery to HorizontalScrollView & ViewPager?

孤者浪人 提交于 2019-11-27 11:09:27
I need simple control for icon choosing on Android 2.2 and higher. Gallery was a better solution for me, but it is deprecated and I have to use HorizontalScrollView and ViewPager instead. But how to migrate easy? How to use this classes and controls in this case? I've try to find complete example for this subject, but I can't find it. This gist from Dave Smith shows a way to use ViewPager to have visual results very similar to a Gallery : Quoting my blog post on the topic of showing multiple pages at a time in a ViewPager : His container ( com.example.pagercontainer.PagerContainer ) wraps the