Android 上的动态品牌
我的要求是我需要在运行时更改所有图像和颜色。但据我所知,图像需要位于可绘制文件夹中。所以我的问题是,导出 apk 文件后,我是否能够通过应用程序从服务器下载图像并将它们设置为应用程序中的图像?
举个例子,假设我有一个线性布局,其背景图像位于我的可绘制文件夹中。在设备中安装应用程序后,我可以从服务器下载图像并将其设置为线性布局的背景吗?
我希望我已经把问题说清楚了。任何帮助将不胜感激。
提前致谢。
My requirement is that i need to change all the images and colors at run time. But as far as i know the images needs to be in the drawable folders. So my question is, after i export the apk file will i be able to download the images from a server through the application and set them as the images in the app?
For an example, lets say i have a linear layout with a background image which is in my drawable folder. After installing the app in the device can i download an image from a server and set it as the background of the linear layout?
I hope i have made the question clear. Any help would be greatly appreciated.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个(我发布了我的 FrameLayout 版本,Imageview 应该类似):
try this one (i posted my version for FrameLayout, Imageview should be similar):