Android - linking 2 pictures - android

I have 1 problem. I want to link 2 pictures.
Example:I link picture A with picture B. And when i open picture A and i hold my finger on screen for x second, picture B appears.
How can I do that.
I want to link photos in default gallery. And linking via imageview will need to be in my app ( I open 2 pictures in my app and then link them), but I don't want that. I want like this:
My app will be camera(that I created) and then I take pictures and ( in backround) my app link 2 pictures and put them in default gallery. And then when someone open first picture(picture A) and hold his finger x seconds, second picture(picture B) appear.
Thanks

Put another imageview on that imageview and set your picture2 in that view.
when you long press first imageview make it's visibility gone and visible another imageview.

Related

HorizontalScroll Image on Android

I'm new at developing app and I'm trying to do my first app on Android Studio.
I have a problem: I would like that my horizontal scroll targets immediatly the next image (I will leave the photo)This is the first image that we see
After that photo, there is another one: Second Image
You can see that it shows both image 1 and image 2 together and I would like that it shows just 1 image at a time.
Tell me if the question is clear and if you need more information. Thanks
You Can Set One Image At a Time After Time Click The Second Image Is Popup Using The Image Slider
For Image Slider You Use With ViewPager

Android : Imageview with fixed position on next activity

I am developing application where user capture's photo and moves to next activity with captured image. Now in next activity i have already given another image via XML which i am able to move and set anywhere over captured image now what i want is when i press OK button then this activity should move to next activity with captured image and also other image which i have set.
i have done with this but the problem is, i want to Fix the position of other image, example if i have set that image on captured images Nose then it should show on nose for Next activity. I don't have any idea about this. Can anyone tell me how to fix the absolute position of Image or any sample code that might help me.
Here you can see the photo, When i press OK button next activity looks something like this. http://share.pho.to/3wDYP
Basically you need to merge these two images into one. Create a bitmap and add both images into one.
Here is an example answer1 and answer2.
Also This is a very useful Tutorial 1 and Tutorial 2 for you.

android open file in gallery without MediaScannerConnection

Hello i am using this code ( https://stackoverflow.com/a/6772455/579646 ) to open an image in Gallery, but on android 2.2 and 2.3 it shows a me Toast saying "searching for new images and albums ..." and then after about 10 seconds of blank screen it finally shows my image. Plus if i change the image but leave the same file name, the gallery cache kicks in(or something like that) and i see the old image when zoomed out and new picture when zoomed it. The only fix is to use random name every time.
If i use this link https://stackoverflow.com/a/5814533/579646 then it opens faster but then i invade the gallery and it adds a folder to it. Is there a way to remove the folder after the user closes the gallery ?
How can i make Gallery open just one Image without scanning stuff and without adding some folder to the gallery by mediascanner ?
Thanks
Your best option is to create your own Activity for displaying an image within your app (answers to this question should help). You then have complete control over the actions it does. Create a simple activity that takes a path to the image and simply opens that path and displays the image in a full-screen ImageView.
I say this because there's not much you can do about Gallery updating its cache whenever it opens - once you move to a different activity, your app has no influence. And ACTION_VIEW is the correct Intent to be opening an image, but remember that users may not have the standard gallery as the default activityfor it. If they have a different default, the experience might not be so bad.

Android, How to show array of address of images with intent?

I have an array which includes URL address of for example 20 images. When user clicks on a button i need to show image in full screen mode and if user touched the screen and his finger points to right or left then show next or previous image (something like loading image from gallery and navigating to right or left).
Is it possible to do it with intents? Thank you.
Yes you can do it, find out the Gallery example in Android Universal Image loader.

adding flickr pictures to android gallery and display it

I am new to android, I have learned how to display drawable pic in gallery,
and display a url pic use ImageView. Now I dont know how to display online pictures in gallery. Should I use listview or not? In addtion, I want to know how to get pictures urls from flickrs with given userid
Do you mean like a photo gallery? is that what your app is supposed to do? Then, yes you could use a ListActivity/ListView. However i do not know if this will provide you with exactly the effect you want. A list view would load ALL of the pictures before the UI could be displayed and you would view them by scrolling. typically a photo viewer shows pictures full screen and switches with either a button or a swipe (gesture).
To get the latter effect, your app could display an ImageView with the first pic while it loads the next pic, and then switch to a new ImageView when the user clicks a button or swipes. this will prevent your app from eating up resources and will give you an interface that people are more used to.
as for flickr, you will have to ask someone else (you should separate these into two separate questions because they are so different)

Categories

Resources