Zoom implementation of Android background image
Zoom of Android background picture
ONE Goal,ONE Passion !
We see some effects. The background picture in the control will slowly grow larger, but the control will not grow larger with the enlargement of the picture The effects are as follows:
analysis:
If you want to make the picture bigger and the size of the control itself cannot be changed, you must change the size of the picture itself, not the size of the control
Implementation principle:
1. First, get the image we want to enlarge, bitmap
2. Use bitmap createBitmap(). Create a copy of the bitmap
3. Use the matrix to change the size of the image copy itself
4. Use valueanimator to draw the copy according to the change rate
Custom view
Run
Violinist
Matrix usage to be continued
okay. Using the control directly, we can pass in the drawable in the resource file
Thank you for reading, hope to help you, thank you for your support to this site!