作者dreamcwli (dreamcwli)
看板AndroidDev
标题Re: [问题] Theme 和 Style 从code改变
时间Thu Jun 7 14:18:18 2012
可以在程式码中根据设定把 Context 包成 ContextThemeWrapper,
再用 ContextThemeWrapper 产生 LayoutInflator 就可以了。
※ 引述《jessy1092 (Lee)》之铭言:
: Theme 我知道可以从 code 中改变 全局样式
: Style 则是个别改变 view 例如 Button的背景 EditText 字的大小
: 但似乎无法从 code 中 去设置
: 我想要做到 能让使用者选择一个 Theme 然後 除了全局样式
: 各个Button TextView等 的背景 配色 等等 随之改变
: 想请问 各位大大 有没有解决办法 ~"~
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.109.18.84
※ 编辑: dreamcwli 来自: 140.109.18.84 (06/07 14:20)
1F:推 jessy1092:感谢 之後来试试看!!! 06/10 13:35