作者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