Detailed explanation of selecting picture examples from gallery in Android
•
Android
Android selects pictures from the gallery
In Android, how to select pictures from Gallery Gallery is actually very simple. The steps are as follows
1) Design an ImageView to display the pictures selected from the gallery
2) learning how to tune gallary in a button is actually intent.
3) Then, after calling out the gallery in onactivityresult, select the good picture, and we will re display it in the ImageView of the page. Therefore, the code is as follows:
Where URI selectedimage = data. Getdata(); All the data of the pictures in the gallery have been obtained.
In this way, when the user selects a picture in the gallery, it can be presented in the ImageView control
Thank you for reading, hope to help you, thank you for your support to this site!
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码