如何在Android应用程序中为不同的主题设置不同的可绘制图像?

时间:2012-02-16 15:04:13

标签: android themes

如何在Android应用程序中为不同的主题设置不同的可绘制图像?

1 个答案:

答案 0 :(得分:0)

您可以使用动态结构来实现它,其中所有设计信息都来自服务器

 1.for that you have to create a xml having list of themes what names you required to give associated with an id.
 2.parse xml and show its content to a list then at selection of an item of list save id associated with it in your shared preferences.
 3.each time when the designing part will be loaded you will send id with it as http://xyz.abc.com/images/menu-images/your_id which will respond you with an image or design info related to that theme id
 4.to save downloading each time of content indroduce a check that if value saved in preferences then use existing image saved or cached in application
 5.Or in case you want to ship images with your applicatio just hardcode the tag the theme id with the image name at run time check selected theme and show the theme related images
   hope this idea will help you.