问题:Android 中主题已经设置,但是在某些Activity 中无效
解决:参考引用的博客,在listview 中listView.setAdapter(adapter); 中再次设置
主题:getApplication().setTheme(R.style.myAppTheme);
然后主题就生效了,经过分析这个问题主要出现在用 Thread 操作的view 中。
暂时记录, 具体原因还没有查清楚
http://blog.csdn.net/wsscy2004/article/details/7562909
关于设置主题的注意事项:
解决:参考引用的博客,在listview 中listView.setAdapter(adapter); 中再次设置
主题:getApplication().setTheme(R.style.myAppTheme);
然后主题就生效了,经过分析这个问题主要出现在用 Thread 操作的view 中。
暂时记录, 具体原因还没有查清楚
http://blog.csdn.net/wsscy2004/article/details/7562909
关于设置主题的注意事项:
不少同学会发泄setTheme()竟然会无效。那么注意
使用setTheme()只能在Oncreate()之前使用。在setContentView(),还是不行那么就在super.onCreate(savedInstanceState);之前
如果要使用动态切换主题,那么就必须调用actvity.finish()。然后再重新加载setTheme()