Android Question PreferenceActivity FullScreen without setting a Theme

Pantelis

Member
Licensed User
Longtime User
Hi all.
Is it possible to make an PreferenceActivity FullScreen and NoTitleBar without setting a Theme? I want the PreferenceActivity to maintain the theme of the device but FullScreen.

Thanks
 

anallie0

Active Member
Licensed User
Longtime User
set the Region Activity Attributes

B4X:
#Region  Activity Attributes
    #FullScreen: True
    #IncludeTitle: False
#End Region
 
Upvote 0

Pantelis

Member
Licensed User
Longtime User
Region Activity Attributes is present on a user created activity. But how to change these attributes on the activity created from PreferenceActivity Library?
 
Upvote 0

Pantelis

Member
Licensed User
Longtime User
The only way i found in the forum to do this in the manifest is this
B4X:
AddApplicationText(
<activity
  android:name="anywheresoftware.b4a.objects.preferenceactivity"
  android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
</activity>
)
But this changes the theme of preferenceactivity, so i have different theme on my main activity and different theme on preference activity if target device had API 11 or better. I want the theme of main and preferenceactivity to be the same on every device. If i dont put this code to manifest editor the themes are same. But if i put it the theme of preferenceactivity changes.
Is it possible to change only those attributes (FullScreen and NoTitleBar) without to set a theme?
 
Upvote 0

Pantelis

Member
Licensed User
Longtime User
Thank your for the response Erel

I tried it. It gives me this error.
B4X:
Parsing code.                          0.01
Compiling code.                        0.04
Compiling layouts code.                0.00
Generating R file.                      Error
AndroidManifest.xml:23: error: Error: No resource found that matches the given name (at 'theme' with value '@android:style/Theme.Holo.Light.NoActionBar.Fullscreen').

I use API8 for my app for backward compatibility.
 
Upvote 0
Top