📌  相关文章
📜  如何以编程方式在 android studio 中更改应用程序的主题 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:29.899000             🧑  作者: Mango

代码示例1
So, to switch between themes dynamically you simply need to call 
setTheme before super.onCreate like this:

  public void onCreate(Bundle savedInstanceState) {
      setTheme(android.R.style.Theme);
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_second);
  }