Question

I have 2 PageViewers with 2 series of pictures each. Initially they were one close to another, but then I decided to make them overlap. To do that, I increased one's height with, let's say, y. I want the overlapping to be visible only for the images with bigger height(they're PNGs), so the ones with the initial ViewPager height would look just like before the resizing enter image description here

enter image description here

So, once I applied the y height, I saw that a gap appeared in the resized pageviewer, making the image decalate with y px. This somewhat seems normal, but ruins the mechanism, because I want the starting point of any image to be the upper-left corner of the pageviewer. I tried and researched all the layout attributes & pageviewer methods for something to help me set the starting point but I kinda went out of ideas.

Was it helpful?

Solution

You can try this:

android:layout_alignParentTop="true" to make the image to be the upper-left corner of the pageviewer.

For imageView we can set this property:

android:scaleType="fitXY"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top