简体   繁体   English

Android-将图片设置为imageview作为用户个人资料

[英]Android - set image to imageview for user profile

i have an app that get picture from gallery and display into ImageView. 我有一个从画廊获取图片并显示到ImageView中的应用程序。 i want the image to stay. 我希望图像保持不变。 when a user select image from gallery or camera i want the image to set as profile.the problem i have is when image selected and display, if i reopen the app the image is gone it does not say.i know i could you url but i dont want like that. 当用户从图库或照相机中选择图像时,我希望将图像设置为配置文件。问题是当选择并显示图像时,如果我重新打开该应用程序,图像消失了,它不会说。我知道我可以输入网址,但是我不想那样。 whether SharedPreference , Bitmap catch or string64 i dont know. 是否SharedPreference,位图捕获或string64我不知道。 i'm feeling dump now i couldn't solve and couldn't find any example. 我现在感觉很沮丧,无法解决,也找不到任何示例。 i searched a lot but i couldn't find. 我搜索了很多,但找不到。

Thank you!!!! 谢谢!!!!

I understand your requirement as to persist the profile image. 我们了解您保留个人资料图片的要求。 Basically you can get the image from gallery and store it in your app storage. 基本上,您可以从图库中获取图像并将其存储在应用程序存储中。 So next time, you open the app you can get the image from storage. 因此,下次打开应用程序时,可以从存储中获取图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM