2

我想使用动态主题颜色并从服务器获取颜色,请问最好的方法是什么,如果我可以从 java 中编辑 xml 中的颜色属性,我该怎么做。

4

1 回答 1

2

你想改变什么颜色?布局背景颜色?

LinearLayout ll = (LinearLayout) findViewById(R.id.linearLayout);
int color = Color.argb(255, 255, 0, 255); // Use your values from the server here
ll.setBackgroundColor(color);
于 2013-03-11T12:27:06.937 回答