B4A Code Snippet Theme Colors - Erel    
Aug 10, 2026   
(21 reactions)-2017-12-28_11.21.22.png
The manifest code:
SetApplicationAttribute(android:theme, "@style/LightTheme")
CreateResource(values, colors.xml,
<resources>
<color name...="navigationBar">#ff006db3</color>
</resources>
)
CreateResource(values, theme.xml,
<resources>
<style name="LightTheme" parent="@android:style/Theme...: remove the default call to CreateResourceFromFile(Macro, Themes.LightTheme)...
B4A Code Snippet [B4X] Share your B4XDialog + templates theming code - Erel    
Jun 1, 2021   
(9 reactions)Have you created a nice dialog based on B4XDialog?
Post it here.
If you have any question then start a new thread....
B4A Library Themes manifest macros - fix for light navigation bar - Erel    
Aug 13, 2026   
(6 reactions)This is not a library. This jar holds the two theme snippets:
CreateResourceFromFile(Macro, Themes.LightTheme) 'or DarkTheme
With Edge to Edge + light theme (default) and when the navigation...">true</item>
The updated light theme, which is the one affected is:
SetApplicationAttribute(android:theme, "@style/LightTheme")
CreateResource(values-v20, theme.xml,
<resources...
link:
This is not a library. This jar holds the two theme snippets:
CreateResourceFromFile(Macro...
B4A Tutorial Changing the theme at runtime - Erel    
Jan 25, 2019   
(19 reactions)Using the hooks feature it is possible to change the Activity theme at runtime.
The theme is set before the activity is actually shown. This means that in order to change the theme we need to...
The hook code is:
#if java
public void _onCreate() {
if (_theme_value != 0)
setTheme(_theme_value);
}
#end if
There must be a process global int variable named Theme_Value. Note... the inline Java code to break.
Updates
Example updated and the selected theme value is stored in...
B4A Code Snippet [B4X] Light theme B4XDateTemplate - Erel    
Sep 13, 2021   
(15 reactions)Many more options: https://www.b4x.com/android/forum/threads/b4x-share-your-b4xdialog-templates-theming-code.131243
https://www.b4x.com/basic4android/images/i_view64_QAmn2SVit7.png
Example of customizing B4XDialog and B4XDateTemplate.
Sub SetLightTheme
Dialog.TitleBarColor = 0xFFFF7505
Dialog.TitleBarHeight = 80dip
Dim TextColor As Int = 0xFF5B5B5B
Dialog.BackgroundColor = xui.Color_White
Dialog.ButtonsColor = xui.Color_White
Dialog.ButtonsTextColor = Dialog...
Other Themes and fonts in 5.0 - HotShoe    
May 31, 2015   
(1 reaction)Hi Erel, I'm looking at my b4acolors utility to see what I need to do to support the 5.0 style editor themes. My question is: Can fonts be added to the themes as well as the various syntax and element colors beyond just the Bold property, or are fonts done strictly in the IDE itself?
Thanks,
--- Jem...
B4A Code Snippet Full Screen Theme - Erel    
Jun 7, 2018   
(15 reactions).
You can use this theme to prevent it from appearing:
SetApplicationAttribute(android:theme, "@style/DarkTheme")
CreateResource(values-v20, theme.xml,
<resources>
<style
name="DarkTheme" parent="@android:style/Theme.Material.NoActionBar.Fullscreen">
</style>
</resources>
)
CreateResource(values-v14, theme.xml,
<resources>
<style
name="DarkTheme" parent="@android:style/Theme.Holo.NoActionBar...
B4A Code Snippet [B4X] Animated change of theme / layouts - Erel    
Aug 9, 2021   
(21 reactions)584770841
This is an example that demonstrates how Root.Snapshot + 2 BitmapCreators, with the old and new layouts can be used to create a nice transition between two layouts.
Private Sub SetNewTheme As ResumableSub
If bc1.IsInitialized = False Then
bc1.Initialize(Root.Width, Root.Height)
bc2.Initialize(Root.Width, Root.Height)
ImageViewForAnimation.Initialize("... 'already in progress...
bc1.CopyPixelsFromBitmap(Root.Snapshot)
UpdateTheme
bc2...
Share My Creation Changing Theme Colors at Runtime with Edge-to-Edge - teddybear    
Aug 13, 2026   
(16 reactions)The application reads theme colors from the manifest and applies them dynamically at runtime.
172883
The example is a B4XPages project. the library can aslo be applied to Non-B4XPages....
B4A Code Snippet Version safe themes - Erel    
Mar 12, 2018   
(11 reactions)Update: If you are using B4A v8.0+ then you should just add:
CreateResourceFromFile(Macro, Themes.DarkTheme) 'or Themes.LightTheme
Older versions:
If you are not explicitly setting the theme....
Assuming that targetSdkVersion is set to 26 (as soon required by Google) then the theme used by default will be:
Device version
Android 2.x - Always the old Android 2.x theme
Android 4.x - Theme.Holo (dark background)
Android 5.x - 6.x - Theme.Material (dark background)
Android 7.x+ - Theme...
Page: 1  
2  
3  
4  
5  
6  
7