In my app I want to place a .png file and I want it to be viewed as a scrolled image at both landscape and portrait modes, please, suggest a code or example....
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
A simple solution is to scroll a container which contains an ImageView much bigger than the container:
And then use code to scroll it:
Here many improvements can be made such as limit the scrolling range etc... The other way is to control ImageView's matrix... Then you can load an image into a bitmap and draw a portion of it on canvas etc
To make your Imageview scroll if it doesn't fit in height, you can next a ImageView inside a ScrollView in the xml, & add this parameter -
Here's an example -
Try this: