3

How can I set my background image to scroll with my ScrollView? For example, I want to appear one image 640x480 and if you slide down it must appear the other 480 dp of my image..

Ormet
  • 75
  • 12
  • Have a look at this post: http://stackoverflow.com/questions/5833943/scale-background-image-in-linearlayout, that should solve it – Joris Oct 10 '12 at 20:06

2 Answers2

1

try

<ScrollView> 
<RelativeLayout>
<ImageView>  with "wrap_content","wrap_content" and App background here
.
.
.

I have not try this but I guess it will work..

Mohsin Naeem
  • 12,542
  • 3
  • 39
  • 53
0

I'm not sure if you can do that with scrollView but if you want to change your application to scroll horizontally you might consider implement a ViewPager and set a different background at each page. It will smoothly switch between pages displaying different picture on the full screen. You might want to check this tutorial: http://thepseudocoder.wordpress.com/2011/10/05/android-page-swiping-using-viewpager/

Marcin S.
  • 11,161
  • 6
  • 50
  • 63
  • no, I want to scroll with my listview in vertical. My image must slide in vertical. thanks for help – Ormet Oct 10 '12 at 19:39