Sketchware UI
Status Bar Text Color
Tutorial
Step-by-Step
Key Notes
Step 1 & 2
Project Settings
Open Sketchware. Go to Advanced Settings and set Primary Dark Color to White (or any light color). This sets the background.
Step 3 & 4
Access Source Code
Open the 'Show Source Code' menu from the top right. Select the
styles.xml file from the list.
Step 5
Copy Reference
Find
Theme.Material.Light.DarkActionBar and copy the last item reference code. We will replace this theme.
Step 6
Add XML Block
Go to OnCreate logic. Add the 'XML' block from More Blocks (File Manager).
Step 7-9
Configure Code
1. Set Ref: (Copied Code)
2. Set Source code:
4. File:
2. Set Source code:
<item name="android:windowLightStatusBar">true</item>
3. Command: add4. File:
styles.xml
Step 10
Build & Run
Compile the app. Your status bar text should now be black/dark against the light background.
Understanding how the 'windowLightStatusBar' attribute works.
Global Effect
This change applies to all screens in the app because we edited the main
styles.xml theme.
Requirements
This feature requires API Level 23 (Android 6.0 Marshmallow) or higher to work properly.
×

0 Comments