应用程序在更换主题后崩溃到Wallpaper.NotTitleBar

时间:2018-02-01 20:19:44

标签: java android user-interface themes

我已经尝试了很多方法将我的应用程序主题更改为Wallpaper.NoTitleBar,这些都证明是徒劳的。

  1. 修改样式文件会产生错误"您需要将Theme.AppCompat主题(或后代)与设计库"

  2. 一起使用
  3. 使用代码以编程方式更改时

    @Override
    public Resources.Theme getTheme() {
        Resources.Theme theme = super.getTheme();
        theme.applyStyle(R.style.Wallpaper.NoTitleBar, 
        true);
        return theme;
    }
    

    " Wallpaper.NoTitleBar"没有出现在主题的弹出列表中供选择。

  4. 在oncreate中使用以下行  setTheme(R.style.Wallpaper.NoTitleBar; 不会产生结果。

  5. 最后更改清单文件给我带来了各种麻烦,并且还产生错误"您需要将Theme.AppCompat主题(或后代)与设计库一起使用"

0 个答案:

没有答案
相关问题