Android: Mark images selected in gallery - android

I have an app that allows users to select images from the gallery (using an ACTION_PICK intent). I want to allow users to update their selection, by going back into the gallery and making changes. However, when they go back to the gallery for a second/third/etc. time, I want their previous selections to be selected in the gallery... Is there a way to do this?
Thanks for your time.

Do you mean the Gallery app or your own activity containing a gallery of images?
If it's your own activity you can simply store the results of your ACTION_PICK into a shared preference. You can then go through you gallery and mark your items as selected based on those stored preferences.
I hope this helps

Related

One Activity with different Text and Images

I am trying to make one activity that will have a specific text and image based on what button was clicked in the previous activity. The first activity is a page with a bunch of different image buttons of different aquatic plants. Depending on which image button is clicked, I want the text and image of the next activity to be a description of the plant and a picture of it.
The question I have is how do I let the plant information activity know which button was clicked so that it knows which text and image to display?
A generic answer will work so I don't think you'll need any of my code, but if you feel you need it, then I'll post it.
Put it as extras in the intent you use to start the new Activity. Either put the exact strings and image uris, or put some identifier that the activity can look at and decide which one to display.

How to pick images from android mobile gallery and show all selected images in listview?

I need some help.Actually i want to choose multiple images from android mobile gallery and want to show all selected images into another gallery or listview and one more action i have to perform that clicking on that listview or gallery image will be send to a auto mail.How can i do this?
Anyone have idea about this.Please let me know.

Selecting a single photo album in android and get its content

I'm working on my first app and all I want is to import/use/access all photos in a single album. In general the user should create a folder where my app can get custom artwork from.
So far I've build a ListView Dialog and have been at filling it with a list of folders in the gallery folder.
Then I found this: Selecting a single photo and getting it's album's contents.
https://stackoverflow.com/a/6041293/1931743
In a perfect world I'd use android's build in image picker to select a single album but I haven't found a solution for this.
What's your recommendation? Staying with ListView or is there a way of selecting a single album with stock Dialogs?
Thank You!

Android Gallery like app

I want to implement app like Gallery in android.
The images captured from camera/gallery must be displayed in thumbnails and whenever i click on thumbnail image should display the full image like in built Gallery app in android devices.
Please help me..
Import the images selected into a gallery, it will prepare thumbnails automatically.
Take another activity with imageview and a button to display selected thumbnail in full screen, launch this activity when you click any item in gallery. This is available in below example.
Gallery-ImageView Example
Coming to Delete button, you have to write action for this button, onClick() method of button's View.onClickListener interface. Please see android developers website to know more about file deletion.
I think you understood.

How to put background image of an activity during runtime?

In my app, I am letting the user to select a background image(from a gallery of images using Gallery), i.e., on clicking a button, lets say, 'theme', 3-4 images are shown, and the user gets to select one of the images.
Now as soon as he does that, the image should appear at the background of the activity..I am trying to save this choice, by the user, in my database..
but I really have no idea how to proceed, that is, when the 'theme' button is selected, a 'themepick' activity starts, and a gallery of 3-4 images appear...when the user selects an image, this themepick activity is 'finished' and we go back to the initial activity..now in this activity, I am letting the user enter some data(through text fields) . After the user clicks save, the data is going into the database, and is being retrieved well. But i also want to save the path to the selected image(from the themepick activity), to the database, and when I am retrieving all the data and displaying the data(in a separate activity, lets say), the image should come in the background as well.
I tried to elaborate as much as possible.
I urgently need a solution as my submission is due in 2 days.
Thank you!
Use a SharedPreference.
You question doesn't seems to be specific on your problem . If I understood correctly your trying to set a background of an layout on runtime.
You need to find the layout Id and set background as below
View layout= findViewById( R.id.layout);
Bitmap bitmap = BitmapFactory.decodeStream(stream); // your image file stream from a path
BitmapDrawable bg = new BitmapDrawable(bitmap);
layout.setBackgroundDrawable(bg);
Let me know if it helps u.. :)

Categories

Resources