Android :: Reusing Default Android Image Gallery?
Nov 8, 2010
All the examples I've found online for displaying a gallery of images require creating a custom Adapter and doing a ton of manual work. Is there not an Intent that I can simply pass a path or filter to in order to reuse the default image gallery functionality (display thumbnails, touch to view full pic, sharing options, etc) but limit the results to my application's storage directory?
View 1 Replies
Jul 6, 2010
I believe this is pretty trivial but I can't get it to work. I want to display a default image in gallery elements (ImageViews) while their actual image is being fetched from the net. Right now, nothing is shown for an ImageView which its image has yet to arrive. Once it arrives it is immediately shown. What I tried is right after the instantiation of the ImageView to call its setImageResource function like so:
final ImageView i = new ImageView(mContext);
i.setImageResource(R.drawable.loading);
But it doesn't seem to work. Below is the full getView() function.
public View getView(int position, View convertView, ViewGroup parent) {
final ImageView i = new ImageView(mContext);
i.setImageResource(R.drawable.loading);
// if the drawbale is in the buffer - fetch it from there
Drawable bufferedImage = DataManager.getInstance().getImagesBuffer()[position];
if (bufferedImage != null){ i.setImageDrawable(bufferedImage);
BitmapDrawable drawable = (BitmapDrawable) i.getDrawable();
drawable.setAntiAlias(true);
} // if drawable is not in buffer - fetch it from the net via AsyncImageLoader
else { String imageUrl = DataManager.getInstance().getImageBufferInstance().getImageUrl(position);
Drawable downloadedImage = AsyncImageLoader.getInstance().loadDrawable(imageUrl, new ImageCallback() {
public void imageLoaded(Drawable imageDrawable, String imageUrl) {
if (imageDrawable == null) { imageDrawable = getResources().getDrawable(R.drawable.icon);
} i.setImageDrawable(imageDrawable); BitmapDrawable drawable = (BitmapDrawable) i.getDrawable();
drawable.setAntiAlias(true);
} } ); i.setImageDrawable(downloadedImage);
} i.setLayoutParams(new CoverFlow.LayoutParams(Utils.getInstance().getScreenWidth() / 2, Utils.getInstance().getScreenHeight() / 2));
i.setScaleType(ImageView.ScaleType.CENTER_INSIDE); return i;
View 1 Replies
View Related
May 11, 2010
I am playing around with the Gallery widget.I would like to know how can we get the position of the image on focus in the gallery. For example having several pictures in my gallery, if I tap my finger to the right, pictures will come and go until it stop to one. How one can get the position of this one picture that is currently on focus ?I don't know if I was clear enough, if there is anything you want me to add do not hesitate.
View 2 Replies
View Related
Sep 17, 2010
Is it possible to change the default arrangement of the Android Gallery? What i meant is can we make the Gallery in a curved path, where the images will be along the curved path and the same time it has all the properties of the Android gallery?
View 2 Replies
View Related
Sep 20, 2010
I got all images from device's gallery,but i got images path is like,i want to get real image path for each images and send email,how can i get path?given below code i used,anybody knows,please give some sample code for me..i have email code.i want to only get real image path.How can I convert this path to real one (just like '/sdcard/image.png')?
View 1 Replies
View Related
Dec 10, 2009
I added and displayed set of images in my gallery. I made like at a time use can view three images. Now I want to do different Animation for these images?
View 3 Replies
View Related
Mar 18, 2010
I'm sure it's been asked before but are there any good alternatives to the default Gallery/Albums app?
I have a T-Mobile G2 (HTC Hero) on 1.5 at the moment and the Albums app is such a frustration. I really can't see why the developers didn't figure out a way of navigating a tree structure?
Currently I have a lot of photos and they are stored on the SD card under a directory for year (eg 2007) then a directory for month (eg 03_march) then a directory for the event/place. It's how I store them on the desktop. Of course, the Albums app simply shows me every single directory with photos in, so I lose the ability to navigate by year/month/etc.
I know that Astro file explorer can do what I want, but the image viewer it has is limited and simply not as nice as the Album app, and the thumbnails are too small. Am I alone in NOT wanting to see hundred and hundreds of "albums" but rather see my photos stored how *I* want them stored?
View 8 Replies
View Related
Dec 30, 2009
I've got a Droid with Touchdown, which works perfectly except for one issue. Any picture/image that comes through in emails in Touchdown gets saved into the Gallery, making it very large and hard to open. I have figured out where to delete these images, but it is sort of a pain to have to go in and delete them out every couple of days. Is there some sort of setting that I am missing in Touchdown to prevent this?
View 1 Replies
View Related
Jun 22, 2010
I am using gallery widget i want to change selected image. When i run the following code and i use roller ball or arrow keys over device and if i try to scroll left to right or right to left focus goes out of gallery to next item over the screen what is that ?
View 1 Replies
View Related
Apr 25, 2010
I'm developing an app for Android 2.1 upwards. I want to enable my users to select a profile picture within my app (I'm not using the contacts framework). The ideal solution would be to fire an intent that enables the user to select an image from the gallery, but if an appropriate image is not available then use the camera to take a picture (or vice-versa i.e. allow user to take picture but if they know they already have a suitable image already, let them drop into the gallery and pick said image). Currently I can do one or the other but not both.
If I go directly into camera mode using MediaStore.ACTION_IMAGE_CAPTURE then there is no option to drop into the gallery. If I go directly to the gallery using Intent.ACTION_PICK then I can pick an image but if I click the camera button (in top right hand corner of gallery) then a new camera intent is fired. So, any picture that is taken is not returned directly to my application. (Sure you can press the back button to drop back into the gallery and select image from there but this is an extra unnecessary step and is not at all intuitive). So is there a way to combine both or am I going to have to offer a menu to do one or the other from within my application? Seems like it would be a common use case, surely I'm missing something?
View 1 Replies
View Related
Sep 10, 2010
I want to auto select an image in gallery and focus the selected image. I know the position (index) of the image in gallery. I am trying to use in res/layout/main.xml
<Gallery
android:id="@+id/galleryView"
android:layout_below="@id/imageViewMap"
android:layout_width="fill_parent"
android:layout_height="100sp"
android:layout_weight="1" />
in AlbumView.java
gallery = (Gallery) mView.findViewById(R.id.galleryView);
ImageView view = gallery.getItemAtPosition(position);
Unfortunately the above code is returning null. Can you please help in this matter.
View 1 Replies
View Related
Sep 14, 2010
I have a few activities within an app.
Should i be reusing the same location manager or should i call (LocationManager) this.getSystemService(Context.LOCATION_SERVICE) for each new activities?
View 2 Replies
View Related
May 7, 2010
I have seen a lot of posts about this, and it seems like the code below should work. I have created an SD Card image and added it to the emulator (and that works fine).
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType("image/*");
//intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(intent, 1);
It does launch and allow selection of images, but when I click on an image, everything exits and the emulator returns to the home screen, not back to my app. My onActivityResult is never called either. What am I missing?
View 2 Replies
View Related
Jan 24, 2010
I want to do an image gallery like in iphone. I want to show low quality (pre-resized) images and when the image is active I want to process the big image and show the result in the gallery. I have two questions. How to attach a listener on the animation stop in gallery? And how to access an image after this action?
View 1 Replies
View Related
Sep 20, 2010
I'm new to Android and I want to make an image gallery where each column is a category, and users can scroll both vertically and horizontally. I found a useful post about how to display list of images here. I'm wondering if it's possible to nest lists of image inside of a gallery view?
View 1 Replies
View Related
Oct 12, 2010
I am designing a screen , in which I am showing a gallery along with other UI components . The selected item is shown in the center of the gallery . I want to make the size of selected item somewhat bigger than the rest items of gallery .
View 4 Replies
View Related
Dec 10, 2009
I have project A with some classes and some resources (used for classes configuration). I'd like to reuse its classes (and resources necessary for them) in another project B (and possibly in more projects). Currently I have 2 projects in Eclipse and they both builds fine, but when project B is started in emulator it fails with error.It should get classes and resources from both projects and package them together. 2) Make a third project which consists of symbolic links to classes and resources of those two projects. 3) Make project A as a service and consume it in project B. They all are imperfect: - 1 and 2 would pack classes and resources of project A into the .apk of project B. - 3 has performance penalty and reuse is not so easy.
View 16 Replies
View Related
Nov 19, 2009
In my app, user starts a service and shows a notification from activity A. The notification creates a Pending Intent that will invoke activity A should the user tap on it. The problem with this behavior is that, if the user starts the service (which shows the notification), drags down the notification bar, then taps the notification, I now have two activity A's in the display stack, one on top of the other and both exactly the same. How can I re-use the original activity A in this situation so the user isn't duplicating activities?
View 4 Replies
View Related
Oct 14, 2010
I've had an app on the market for over a year. Recently customers have been reporting a crash; all customers have been running Android 2.1 or 2.2 (note sure if the crash is limited to those platforms tho; interesting that this does work on the simulator but not physical devices. Maybe devices renamed the component name of the image gallery?). The crash occurs when I attempt to lauch the Image Gallery app.
Is there a preferred method to launching the Image Gallery?
I use the following code.
CODE:.............
How to fix this or a new method to launch the Image Gallery?
View 2 Replies
View Related
Nov 24, 2009
I'm currently developing for Android using Eclipse. I have a lexicon viewer application (with package name "com.mycompany.myviewer") that I want to reuse multiple times, just changing specific resources such as app name and icons.For example, I have a certain publisher "Publisher1", who publishes the lexicons "Lexicon1" and "Lexicon2". I would need to two applications: App1 with certain name and icon, and App2 with another name and icon.What is the best way of doing this in Java? In visual Studio (and C++) I could create two projects based on the lexikon viewer app and use conditional resources to get the right name and icon. Is there some way of doing something similar in Java?
View 2 Replies
View Related
Oct 31, 2010
I am writing a application and it should be protected with a password. Instead of building a new one, Is it possible to use the Android's Pattern lock screen from application with different patterns?
View 1 Replies
View Related
May 21, 2009
I'm writing a widget. Currently, I'm have a simple ImageView, and calling RemoteViews.setImageViewBitmap(). I'm using a service to do the updates.
I thought it might be a good idea to reuse an existing RemoteViews instance, so I'm only querying it the first time around, and subsequently simply call setImageViewBitmap() with the new image.
This works well initially, but after some time I first start getting "!!! FAILED BINDER TRANSACTION !!!" errors, and later, an OutOfMemory exception.
Simply creating a new RemoveViews instance every time works flawlessy on the other hand. I'm just curios why that would be, any ideas?
View 2 Replies
View Related
Jan 30, 2010
I am trying to open an image / picture in the Gallery built-in app from inside my application. I have a URI of the picture (the picture is located on the SD card).
View 3 Replies
View Related
Mar 15, 2010
I've written an app, thats loading images either using the android gallery app or by taking a photo using the cam. When I now load an image using the gallery, everything is fine. When the code is being executed a second time (for loading another image), the application crashes.
try { Uri data = intent.getData();
ContentResolver cr = this.getContentResolver();
Bitmap mBitmap = null;
mBitmap = Media.getBitmap(cr, data);
imageView.setImageBitmap(mBitmap);
} catch(Exception e){ showToast(this, "Failed loading image from gallery");
return;
}
The code crashes at the line:
mBimap = Media.getBitmap(cr, data);
Everything is initialized, there are no null values etc. The strange thing is: no exception is thrown, I don't get into the catch block to determine whats going wrong. Am I not allowed to "re-use" the content resolver? Do I have to free it after the first usage or something like this?
View 2 Replies
View Related
Apr 15, 2010
I have four images in the Gallery View. When we do swipe from left to right or right to left the Gallery View moves all the images i.e if I swipe from left to right from the first image then it will move to all the four images. What I want is that when I swipe it should only move to the next image.
View 2 Replies
View Related
Sep 25, 2010
In my application the user selects an image. When the ACTION_GET_CONTENT intent is launched it displays the dialog to select one of the available image viewers installed on the device. However I need the built in Gallery app to be chosen because upon selecting an image it launches the screen to crop the image (same thing that comes up when choosing the home screen wallpaper) which only the Gallery chooser offers.
Is it possible to skip this chooser dialog and launch the Gallery automatically? Or at least remove the other options from the list so only Gallery displays?
View 3 Replies
View Related
Oct 30, 2010
I've got an app that accepts images from the image gallery (via share menu). My app starts, and I do this:
Bundle bundle = getIntent().getExtras();
Object obj = bundle.get("android.intent.extra.STREAM");
While debugging, Eclipse is reporting the object obj is of type 'Uri@StringUri' (???) and inside it somewhere is the string 'content:
//media/external/images/media/992'.
Anybody know what type of object obj is so I can typecast it? And what's the string about? IE, how do I get to the image data?
View 1 Replies
View Related
Oct 14, 2009
I was capturing images before that were showing up in the gallery, but now they are not and I can't figure out why. Here is my code:
ContentValues values = new ContentValues();
values.put(android.provider.MediaStore.Images.Media.IS_PRIVATE, false);
String name = "ugc_" + String.valueOf(System.currentTimeMillis());
values.put(android.provider.MediaStore.Images.Media.TITLE, name);
imageURI = getContentResolver().ins (android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
I also tried:
values.put(android.provider.MediaStore.Images.Media.IS_PRIVATE, 0);
As well as leaving out that value, but nothing seems to work now.
View 2 Replies
View Related
Feb 4, 2010
When I take a picture with Android's camera app, it is inserted in the gallery with a name identical to it's creation date/time, like "2010-02-04 16.36.15.jpg". In my app I take my own pics, and insert to the gallery them using:
android.provider.MediaStore.Images.Media.insertImage(
ContentResolver cr, Bitmap source, String title, String description);
However, in the gallery they appear with a name that seems to be the time stamp of their creation in millis, like "1265323665851.jpg", no matter what I put in the tittle argument. I need them to have the same name they would get from Android's camera app, so that they will be properly ordered.
View 1 Replies
View Related
Aug 7, 2010
I have implement gallery widget. I just wanted to provide an option to user, that he can download images from gallery. What to do in order to implement downloading options? And I do have imageID and imageName, which user selects.
View 1 Replies
View Related