开发者

Get activity theme from network and apply it programmatically

开发者 https://www.devze.com 2023-02-16 11:59 出处:网络
I want to download themes.xml from network because i开发者_如何学Go need dinamically change application theme.

I want to download themes.xml from network because i开发者_如何学Go need dinamically change application theme. So after application starts, download file themes.xml from network, saves it locally and apply to current activity.

How i can do this?

Thank you.


in oncreate functions, get the value from network and do like this:

if (valueRecievedFromNetwork == "Dialog")
    this.setTheme(android.R.style.Theme_Dialog);
else if.......
0

精彩评论

暂无评论...
验证码 换一张
取 消