views:

838

answers:

1

Hi Folks,

I have to acheive that the Touch Scroll on the View Flipper. For Example. I have to Images. At First, ViewFlipper Shows an First Image. Now I Flung the view from right to left. The First Image view SLide out Left and Th Second Slide in from Left. I can Achieve it By this Post. But I want to Scroll the image. that is, On the Action_Move Event i want to do Touch Scroll. For Example, When i move the touch from right to left. it will flung how much the touch moves. on that time the output should looks the both images partly. How to do that? What i have to measure the Screen levels(height & width). Example codes are more helpful. Sorry for the Bad English. Thanks.

+2  A: 

I created an example that does what you want I think. See Source Code: ImageView Flipper + SD Card Scanner

androidworkz
+1 Thanks for Reply.This is what i have already done. please read my question. i want to perform the touch scroll on it.
Praveen Chandrasekaran
You must not have looked at the example I posted... because that is exactly what it does... however, you have to create your own touch listener and TranslateAnimation to get the tactile "move with finger" result and you are correct that the example doesn't do that and I have yet to find an example that shows how to accomplish it.
androidworkz
androidworkz
That nice. But more complicated to integrate on my code. I created all layout as resource xml.
Praveen Chandrasekaran
I only have to fix saving application state after integrating his ideas in to the viewflipper above. Once I do that, I will post the code on my blog and post here. I also used xml... but I changed how I did it. I created a parent layout (main.xml) which only contains the FrameLayout and then I created a second layout which only contains the layout for each individual image. This way I can use the ViewHolder design pattern for the getView and I only call inflate twice... once for the parent (FrameLayout) and once for my ImageView.
androidworkz
also I had to create a new custom adapter because his adapter required a textview
androidworkz