从存储卡获取图像并存储在drawable文件夹中
我制作了一个显示许多图像的应用程序,
所有图像都预先存储在资源的可绘制文件夹中,
但是如果我想添加新图片,那么我该怎么做,
它应该从存储卡读取,但只能读取一次,之后它会自动加载。
I made a application in which many images are shown,
all images are pre-stored in drawable folder of resources,
but if i want to add new picture then how can i do this,
it should read from memory card but only once, after that it automatically load.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果我理解正确,您想自己将图像上传到应用程序,而不是让用户使用图像或..?
如果是您应该上传新图像,您可以将它们下载到应用程序并检查是否有新图像。
如果是用户,您可以检查 SD 卡上的画廊,但不幸的是我认为不可能将这些存储在可绘制文件夹中。
If I understand correctly, you want to upload images yourself to the app instead of letting user use images or..?
If it's you, who should upload new images, you can download them to the app with a check if there are new ones.
If it's the user, you can check their gallery on the sd card, but unfortunatly I don't think it's possible to store these in the drawable folder.
你的意思是你想要一个动态可绘制文件夹?你不能这样做,因为 APK 文件是只读的......
You mean you want a dynamic drawable folder? You cannot do that since APK file is read only...
你不能这样做,因为这是不可能的行为,Drawable 文件夹的目的是在部署时创建应用程序环境,这是一个单向过程。您可以将 Drawble 图像复制到外部路径
you cant do this, because it is an impossible act, Drawable folder is meant to make the Application Environment when it is deployed, it is a one way process. you can copy Drawble image to external path