Android Question Display half part of image in imageview

asales

Well-Known Member
Licensed User
I have a image with 600x450 pixels and I want to display only 300x450 (right or left) of this image in a imageview.

If I click in button1 it shows 300x450 (left part) of image; if I click in button2 it shows 300x450 (right part) of image.

How can I do this (directly, without crop and save the image)?

Thanks in advance for any tip.
 

sorex

Expert
Licensed User
put the image in a panel that has the size of 300x450 and then change the .left value of the inner image to either 0 or 350
 

sorex

Expert
Licensed User
correction...

it should be 0 or -350, otherwise you push it to the right and it becomes invisible.
 
Top