How to set profile picture app from Android Gallery

走远了吗. 提交于 2019-12-08 12:20:48

问题


I want a simple way where there is an ImageView representing a user profile picture. It is set to a default photo if they have not picked one.

I would like them to simply click on it and it opens up the gallery and they can set (and crop) a profile picture. That picture than is set in the ImageView (and stays there the next time the app is opened -- I am also using an Internet MySQL database to connect to that I may need to store the picture in so other users can see. I just need to see the Android side of things).

I am assuming I may need to use an Intent of some sort? Can I see basic code on how one might do this?


回答1:


Here's a tutorial on using an intent with the Gallery: http://www.helloandroid.com/tutorials/gallery-intent-tutorial



来源:https://stackoverflow.com/questions/12964357/how-to-set-profile-picture-app-from-android-gallery

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!