# Customization

## Getting started

To start customizing the UI, you can copy and paste the code below and edit the text as you like.

{% hint style="danger" %}
Make sure to do `Cotter.init` **before** setting any of the UI customization
{% endhint %}

## Approve Authentication Request Prompt

![ApproveRequest page](https://107069962-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QGDMRD8y_Kd-BpOvT%2F-M19t7q3Mcce3xukm6cZ%2F-M19xPSu0WBH_aViSHhb%2Fimage.png?alt=media\&token=9848add4-5ad6-47be-81c1-e689db3f42fb)

To customize this page, do the following:

```java
Cotter.strings.setApproveRequestStrings(Strings.Title, "ARE you trying to sign in?");
Cotter.strings.setApproveRequestStrings(Strings.Subtitle, "SOMEONE is trying to sign in to your account from another device.");
Cotter.strings.setApproveRequestStrings(Strings.ButtonYes, "YES");
Cotter.strings.setApproveRequestStrings(Strings.ButtonNo, "NO");
// To update the logo, add an image in your /res/drawable folder
Cotter.colors.setLogo(R.drawable.logo);
```

## �Request Authentication Prompt

![RequestAuth prompt](https://107069962-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QGDMRD8y_Kd-BpOvT%2F-M19xbZ0ae99SHUTFVLQ%2F-M1AHeV_e98wQCNw1Rfr%2Fimage.png?alt=media\&token=3ab4cfea-27b9-4c8f-9ca5-a1e1b8121be0)

To customize this prompt, do the following:

```java
Cotter.strings.setRequestAuthStrings(Strings.DialogTitle, "APPROVE this login from your phone");
Cotter.strings.setRequestAuthStrings(Strings.DialogSubtitle, "A NOTIFICATION is sent to your trusted device to confirm it's you.");
Cotter.strings.setRequestAuthErrorStrings(Strings.DialogTitle, "SOMETHING went wrong");
Cotter.strings.setRequestAuthErrorStrings(Strings.DialogSubtitle, "WE'RE UNABLE to confirm that it's you. Please try again.");
```

## �QR Code Scanner Dialog

![SuccessSheet dialog](https://107069962-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QGDMRD8y_Kd-BpOvT%2F-M1AHrwLl1sqOyVJf4JZ%2F-M1AIlGR0xkR5gqKkJm3%2Fimage.png?alt=media\&token=2fd6bb63-5a15-4ba5-807b-7d17e0f5fa8f)

To customize the text in this dialog, do the following:

```java
Cotter.strings.setSuccessSheetStrings(Strings.DialogTitle, "SUCCESS Registering New Device");
Cotter.strings.setSuccessSheetStrings(Strings.DialogSubtitle, "YOU CAN now use your new device to access your account without approval.");
Cotter.strings.setSuccessSheetErrorStrings(Strings.DialogTitle, "UNABLE to Register New Device");
Cotter.strings.setSuccessSheetErrorStrings(Strings.DialogSubtitle, "PLEASE try again.");
```

## Show �QR Code Page

![QRCodeShow page](https://107069962-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QGDMRD8y_Kd-BpOvT%2F-M1AIwjUjcj1w7JqSpbM%2F-M1AJdFW8XiJKAyLFI_t%2Fimage.png?alt=media\&token=ff7c42d6-bb41-444c-95e6-b1f96ddeeafe)

To update this page, do the following:

```java
Cotter.strings.setQRCodeShowStrings(Strings.Title, "REGISTER this Device");
Cotter.strings.setQRCodeShowStrings(Strings.Subtitle, "PLEASE scan this QR Code from a Trusted Device.");
Cotter.strings.setQRCodeShowErrorStrings(Strings.Title, "SOMETHING went wrong");
Cotter.strings.setQRCodeShowErrorStrings(Strings.Subtitle, "THE REQUEST timed out. Please try again.");
```

�
