The style resource is a collection of styles applied to UIKit by default. There are three different styles that the UIKit provides: Module, Component, and Widget.Sendbird. You can customize them by inheriting the UIKit-defined style components and overriding the res/values/styles.xml
file, which consists of the following xml
elements.
Note: To apply the
Dark
theme, you can use theres/values/styles_dark.xml
file, which includesModule.Dark
,Component.Dark
, andWidget.Sendbird.Dark
. As for open channels, you can apply theoverlay_mode
style by using theres/values/styles_overlay.xml
file, which containsModule.Overlay
,Component.Overlay
, andWidget.Sendbird.Overlay
.
Each key function has a corresponding style and the same style that's applied to the components is applied to the module. In order to customize the style of a module, you need to first inherit the component's style and create a new custom style. Then, you can apply the custom style to the module by either overwriting the default style or inheriting the style in the theme.
The style of each component contains the same values as the style of the corresponding module. In UIKit for Android, the smallest unit of style that you can customize is the component. In order to customize the style of a component, you need to first inherit the component's style and create a new custom style. Then, you can apply the custom style to the component by either overwriting the default style in the module or applying it to the theme.
There's an exception to applying styles to list type components such as messageListComponent
. Since you need to apply the style to each component's ViewHolder
through the adapter, you must use the Widget.Sendbird
.
The Widget.Sendbird style is applied to each type of view in UIKit for Android. It includes the style of a list's ItemView and the style of dialog and toast views in the form of widgets. Theses styles, except for widgets used in the ItemView, cannot be set through the theme. You must set and customize each style in the view.