我正在尝试通过单击按钮
更改我的应用程序的主题。我在我的 Activity
中定义了一个 onClick()
函数。
我的代码:
public class Screen2 extends Activity{
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.secondscreen);
}
public void theme(View view){
getApplication().setTheme(android.R.style.Theme_Holo);
}
这是行不通的。您能帮我更改应用程序的主题吗?
提前致谢。
最佳答案
关于android - 我想更改整个应用程序的主题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11577143/