0

I'm seeing a very odd theme issue in my PreferenceActivity only on Samsung devices (as far as I'm aware).

-----EDIT (Removed irrelevant code)-----------

The following is an unthemed preference activity:

<activity android:name=".FullSettingsActivity"/>

enter image description here

Setting theme for the FullSettingsActivity:

<activity android:name=".FullSettingsActivity"
          android:theme="@style/Theme.AppCompat.NoActionBar" />

yields this:

enter image description here

So clearly the default theme for Samsung devices is rather odd. Is there any reason a PreferenceActivity would end up unreadable like that only on Samsung devices?

Anthony
  • 7,638
  • 3
  • 38
  • 71
  • I'm not sure I follow the relevance of the link. A toolbar is not needed. I just don't know why Samsung devices have that awful color theme where you can't see text. – Anthony Aug 20 '15 at 01:37
  • Question updated with a screenshot of what happens when I explicitly set the `PreferenceActivity` theme. – Anthony Aug 20 '15 at 01:51
  • Probably, you need to ask Samsung...For now, you can either put `android:theme` in XML or call `Activity.setTheme()` from code to enforce theme styling. – ecle Aug 20 '15 at 03:45
  • Yah, it's an odd one that's for sure. – Anthony Aug 20 '15 at 10:51

1 Answers1

0

Try changing your theme from @style/Theme.AppCompat.NoActionBar to something else like android:Theme.Holo.Light.NoActionBar and see the difference.

Also make sure you add that GalleryTheme in your AppManifest.xml in your application tag like android:theme="@style/GalleryTheme"

Hope that helps.

Hussein El Feky
  • 6,627
  • 5
  • 44
  • 57
  • 1
    If he is using `AppCompat v7` support library, he can't use any style not from `Theme.AppCompat` parent – ecle Aug 20 '15 at 01:20
  • As @eee mentioned, anything but AppCompat will crash immediately. I can't even test another theme on a 5.0 device, due to the heavy dependence on AppCompat. – Anthony Aug 20 '15 at 01:30
  • However I did try: `@style/Theme.AppCompat.Light.NoActionBar` and it changed the main activity, but the settings remain unaffected. – Anthony Aug 20 '15 at 01:33
  • Question updated with a screenshot of what happens when I explicitly set the `PreferenceActivity` theme. – Anthony Aug 20 '15 at 01:51