I found that setScrollX
doesn't work in the same way in different screen sizes. But the scale method setScaleX
works the same in different devices (I mean it shows the same scaled image). How can I get the same result from setScrollX
in different android phones or tablets?
I used this methods for an ImageView
and actually I want to zoom to an ImageView
and then scroll on it.
ImageView mainImage = findViewById(R.id.mainImage);
mainImage.setImageResource(R.drawable.mainImg);
mainImage.setScaleX(6);
mainImage.setScaleY(6);
mainImage.setScrollX(200);
mainImage.setScrollY(200);