Fragment Must specify preferenceTheme in theme onCreate

后端 未结 1 440
Happy的楠姐
Happy的楠姐 2021-01-01 19:44

I am trying to figure out why I am getting this error:

java.lang.IllegalStateException: Must specify preferenceTheme in theme
at android.support.v7.preferenc         


        
1条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-01 20:32

    Thanks to the solution that @Panther suggested. All I had to do is to add this line @style/PreferenceThemeOverlay to my Application Theme and not just the theme of the individual activity that is showing my PreferenceFragment like that:

    
    
    

    Alternatively you can use

    @style/PreferenceThemeOverlay.v14.Material

    to achieve modern material look.

    0 讨论(0)
提交回复
热议问题