Styling
Last updated
Last updated
Starting from version 0.4.3
, we've moved the styling to styles.xml
.
You can check res/layout/...
and find the component you'd like to style and check the style=@style/<StyleName>
to make your custom style. You can find the default styles at .
If you look at , you'll see:
This means that you can define your own style for the bullets of the pin by adding the following code to your project's res/values/styles.xml
Full list of API to set colors and images:
List of colors and images that overrides the styling colors and images
Container background color = ColorBackground
"Show PIn" text = ColorPrimary
"Error" Text = ColorDanger
Network error dialog: NetworkErrorImage
HTTP error dialog: HttpErrorImage
(not used)
Pin Box (for Reset Pin)
Empty: BoxBackgroundColor = ColorSuperLightGrey
Filled: BoxBackgroundColor = ColorPrimaryLight
Filled: Box Text Color = ColorBlack
Error: BoxBackgroundColor = ColorDangerLight
Error: Box Text Color = ColorDanger
Pin Bullet
Empty: Bullet = ColorPrimaryLight
Filled: Bullet = ColorAccent
Error: Bullet = ColorDanger
Trusted Device QR Code
QR Code Color: ColorBlack
QR Code background: ColorWhite
Success Image on RegisterDeviceQRShowActivity, RegisterDeviceQRScannerActivity, PinEnrollmentSuccessActivity
Success Image: SuccessImage
Error Image on RegisterDeviceQRShowActivity, RegisterDeviceQRScannerActivity, RequestAuthSheet
Error Image: ErrorImage
ApproveRequestActivity
Logo Image: Logo
RequestAuthSheet
Tap Image: Tap
There are some colors and images that are set using Cotter.colors.setColor
as mentioned .