Now you are watching a new wonderful mod for crat pe. Next we need to create our own wrappers for views to support changes of dynamic theme changing.Hello and welcome to Martik Mods. LinearLayout) we can create: data class ViewGroupTheme( val backgroundColor: Int )Īnd the Theme itself will be enum containing different combinations mapped over some finite number of themes - for example LIGHT and DARK: enum class Theme( val buttonTheme: ButtonTheme, val textViewTheme: TextViewTheme, val viewGroupTheme: ViewGroupTheme ) Custom Views Theme will contain different sub-Themes for each design component - TextView, Button etc.įor example for TextView we can create the following Theme description: data class TextViewTheme( val textColor: Int ) We’ll create single place for managing application theme - ThemeManager, and object which describes the Theme itself. Next we should somehow make our views to support dynamic theming. finally we start reveal animation for container, which will actually reveal our new theme.we have left TODO in the code, where we’ll need to change theme for all views.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |