Android using theme for your UI development


We're gonna define theme to use in our app. This means we do not have to manually 'write up' a bunch of "style=" attribute and assigned a custom value to it.

The only major code change we need to do is in our manifest.xml as shown below :-


Declaring theme in manifest 

Here we are assigning a theme called AppTheme/NoActionBar (ok maybe its not a good name)





Default Styling of UI Component in style.xml

Here we have two customer style which we would like to apply to our controls. These are call Widget.TextView.Custom and Widget.Spinner.Customer respectively.



   

Comments

Popular posts from this blog

gemini cli getting file not defined error

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20

vllm : Failed to infer device type