Customization
You can change the text and logo in most of the UI that's provided by Cotter's Android SDK.

Getting started

To start customizing the UI, you can copy and paste the code below and edit the text as you like.
Make sure to do Cotter.init before setting any of the UI customization

Approve Authentication Request Prompt

ApproveRequest page
To customize this page, do the following:
1
Cotter.strings.setApproveRequestStrings(Strings.Title, "ARE you trying to sign in?");
2
Cotter.strings.setApproveRequestStrings(Strings.Subtitle, "SOMEONE is trying to sign in to your account from another device.");
3
Cotter.strings.setApproveRequestStrings(Strings.ButtonYes, "YES");
4
Cotter.strings.setApproveRequestStrings(Strings.ButtonNo, "NO");
5
// To update the logo, add an image in your /res/drawable folder
6
Cotter.colors.setLogo(R.drawable.logo);
Copied!

Request Authentication Prompt

RequestAuth prompt
To customize this prompt, do the following:
1
Cotter.strings.setRequestAuthStrings(Strings.DialogTitle, "APPROVE this login from your phone");
2
Cotter.strings.setRequestAuthStrings(Strings.DialogSubtitle, "A NOTIFICATION is sent to your trusted device to confirm it's you.");
3
Cotter.strings.setRequestAuthErrorStrings(Strings.DialogTitle, "SOMETHING went wrong");
4
Cotter.strings.setRequestAuthErrorStrings(Strings.DialogSubtitle, "WE'RE UNABLE to confirm that it's you. Please try again.");
Copied!

QR Code Scanner Dialog

SuccessSheet dialog
To customize the text in this dialog, do the following:
1
Cotter.strings.setSuccessSheetStrings(Strings.DialogTitle, "SUCCESS Registering New Device");
2
Cotter.strings.setSuccessSheetStrings(Strings.DialogSubtitle, "YOU CAN now use your new device to access your account without approval.");
3
Cotter.strings.setSuccessSheetErrorStrings(Strings.DialogTitle, "UNABLE to Register New Device");
4
Cotter.strings.setSuccessSheetErrorStrings(Strings.DialogSubtitle, "PLEASE try again.");
Copied!

Show QR Code Page

QRCodeShow page
To update this page, do the following:
1
Cotter.strings.setQRCodeShowStrings(Strings.Title, "REGISTER this Device");
2
Cotter.strings.setQRCodeShowStrings(Strings.Subtitle, "PLEASE scan this QR Code from a Trusted Device.");
3
Cotter.strings.setQRCodeShowErrorStrings(Strings.Title, "SOMETHING went wrong");
4
Cotter.strings.setQRCodeShowErrorStrings(Strings.Subtitle, "THE REQUEST timed out. Please try again.");
Copied!
Last modified 1yr ago