Problem and Question:
Currently, I have a pager with a view of only 2 pages / views inside it, which are located next to each other horizontally.
My views are customizable that draw a two-color gradient and an image on top of it with a low opacity / alpha value.
I find that when I sit down on the screen to go from the first view / page to the second or vice versa, the images get squashed. How can I stop this and draw them normally?
Example:
The image on the left shows the first visible visible image, a preliminary swipe ; The image on the right shows two views, halfway through the napkins .


The code:
I have a Drawable variable that I set earlier, overlayImage , that I did nothing but adjust the opacity.
@Override protected void onDraw(Canvas canvas) { p.setShader(new LinearGradient(0, 0, 0, getHeight(), startColor, endColor, Shader.TileMode.MIRROR)); canvas.drawPaint(p);
source share