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 destroy the activity and start it again. You can use StateManager to save the activity state. The...
Edit: this tutorial was written before CreateResouce keyword was available. Simpler usage example: https://www.b4x.com/android/forum/threads/make-edittext-cursor-more-visible.114148/ The standard way to build the UI in Basic4android is with the visual designer / designer script. You can also...
Changing the action bar, status bar and navigation bar colors is done with resources set in the manifest editor. The following code is fully supported by Android 5+ devices but it will also work properly on Android 4 devices. The manifest code: SetApplicationAttribute(android:theme...
Hello, I will show you how to install this Metro skin in your projects. It is a JavaFX css style that allows you to modify the controls, giving it a metro effect. I use JMetro CSS files from: https://github.com/JFXtras/jfxtras-styles/tree/master/jmetro/src/main/resources/jfxtras/styles/jmetro...
1. Download jmetro-4.0.jar and copy it to the additional libraries folder. https://github.com/JFXtras/jfxtras-styles/releases 2. Add reference to the jar: #AdditionalJar: jmetro-4.0 3. Apply the theme: Dim jo As JavaObject jo.InitializeNewInstance("jfxtras.styles.jmetro8.JMetro"...
Sub SetDefaultNightMode (Mode As Int)
Dim jo As JavaObject
jo.InitializeStatic("androidx.appcompat.app.AppCompatDelegate").RunMethod("setDefaultNightMode", Array(Mode))
End Sub
4º Execute funciton from activity_create (is correct?)
B4X:
Sub Activity_Create(FirstTime As Boolean)
SetDefaultNightMode(1) '2 no ok
...