来自调色板的主题
Theme from Palette
我正在制作一个应用程序,可以从某个服务器检索大量图像。我正在使用 Palette 库为 List 中的每个项目着色。 When a choose one I open another activity to show details of this item.
我想根据所选主题构建一个主题来详细应用activity。
有没有办法以编程方式构建基于位图中调色板的主题?
如果是关于material设计的颜色,有解决办法
- 记住:您无法在运行时更改 modify 这些颜色,但您可以在 activity 开始时在主题之间切换。
- 当用户select一种颜色时,应用相应的样式并重新启动activity。否则,更改一些其他颜色,例如 Google keep
设置主题.
super.onCreate(savedInstanceState);
setTheme(...style.YourTheme);
重启activity:调用activity的recreate()方法。
我正在制作一个应用程序,可以从某个服务器检索大量图像。我正在使用 Palette 库为 List 中的每个项目着色。 When a choose one I open another activity to show details of this item.
我想根据所选主题构建一个主题来详细应用activity。
有没有办法以编程方式构建基于位图中调色板的主题?
如果是关于material设计的颜色,有解决办法
- 记住:您无法在运行时更改 modify 这些颜色,但您可以在 activity 开始时在主题之间切换。
- 当用户select一种颜色时,应用相应的样式并重新启动activity。否则,更改一些其他颜色,例如 Google keep
设置主题.
super.onCreate(savedInstanceState); setTheme(...style.YourTheme);
重启activity:调用activity的recreate()方法。