Android Question B4XDrawer - Title partially under the Statusbar

DonManfred

Expert
Licensed User
Longtime User
I am using this Example.

The Titlebar is partially under the statusbar at the top.

Statusbar.jpeg
Edit to add: The Statusbar on the S10 seems higher than on other Devices (as the front camera is positioned there too )

It looks like it happens to all apps using AppCompat on my Device (Samsung S10).
Is there something i need to adapt?
 

DonManfred

Expert
Licensed User
Longtime User
What happens with this example: [B4X] B4XPages + B4XDrawer ?
There is no colored statusbar but the Page is shown as expected. Means the page(s) are correctly after the statusbar.
WhatsApp Image 2020-08-02 at 11.24.29.jpeg

There is no AppCompat used here btw which was not what i wanted. I want implement a AppCompat Design.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
There is no AppCompat used here btw.
I know. Truth is that there is less and less reasons to use AppCompat. AppCompat was very important when Android 4 was popular and it brought the material theme features to Android 4. Now you can just discard the old Android 4 devices.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I know. Truth is that there is less and less reasons to use AppCompat. AppCompat was very important when Android 4 was popular and it brought the material theme features to Android 4. Now you can just discard the old Android 4 devices.
I understand.

Can i use a colored Statusbar without using AppCompat?
 
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
You can try from manifest:
B4X:
CreateResource(values, theme.xml,
<resources>
    <style name="PTheme" parent="@android:style/Theme.Holo.NoActionBar">
    </style>  
</resources>)

CreateResource(values-v21, theme.xml,
<resources>
  <style name="PTheme" parent="@android:style/Theme.Material.Light">
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowActionBar">false</item>
        <item name="android:textColor">#000000</item> <!-- menu text,, msgbox title -->
        <item name="android:textColorSecondary">#AAAAAA</item> <!-- inactive editText line,, scrollbar -->
        <item name="android:colorPrimary">#B72E2D</item> <!-- action bar -->
        <item name="android:colorPrimaryDark">#CA343A</item> <!-- status bar -->
        <item name="android:colorAccent">#AC3433</item> <!-- checkboxes,, switches,, etc. -->
        <item name="android:colorControlNormal">#BBBBBB</item> <!-- inactive checkboxes -->
        <item name="android:navigationBarColor">#FFFFFF</item> <!-- system buttons navigation bar -->    
    </style>
</resources>)

<item name="android:colorPrimaryDark">#CA343A</item> <!-- status bar -->
 
Upvote 0
Top