Android Question Theme color Dark

Scantech

Well-Known Member
Licensed User
Longtime User
SetApplicationAttribute(android:theme, "@style/LightTheme")
CreateResource(values, colors.xml,
<resources>
<color name="actionbar">#FF231F1F</color>
<color name="statusbar">#FF231F1F</color>
<color name="textColorPrimary">#ffffffff</color>
<color name="navigationBar">#FF231F1F</color>
</resources>
)
CreateResource(values, theme.xml,
<resources>
<style name="LightTheme" parent="@android:style/Theme.Material.Light">
<item name="android:colorPrimary">@color/actionbar</item>
<item name="android:colorPrimaryDark">@color/statusbar</item>
<item name="android:textColorPrimary">@color/textColorPrimary</item>
<item name="android:navigationBarColor">@color/navigationBar</item>
</style>
</resources>
)

I want to change it to dark theme. Is this correct?
<style name="LightTheme" parent="@android:style/Theme.Material">

It did not crash. Just wondering if the manifest is correct by removing .Light? Thanks
 

Scantech

Well-Known Member
Licensed User
Longtime User
B4A Version: 13.00
Parsing code. (0.38s)
Java Version: 19
Building folders structure. (0.14s)
Compiling code. (0.42s)
Compiling layouts code. (0.02s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Compiling resources (0.19s)
Linking resources Error
error: resource android:style/Theme.Material.Dark not found.
error: failed linking references.
 
Upvote 0

Scantech

Well-Known Member
Licensed User
Longtime User
Found this on the web

  • @android:style/Theme.Material (dark version)
  • @android:style/Theme.Material.Light (light version)
  • @android:style/Theme.Material.Light.DarkActionBar
For a list of material styles that you can use, see the API reference for android.R.style.
 
Upvote 0

Similar Threads

Top