# iamrohitsuthar/otpactivity architecture

> Architecture diagram of the GitHub repository iamrohitsuthar/otpactivity, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/iamrohitsuthar/otpactivity
- Repository: https://github.com/iamrohitsuthar/otpactivity

## Overview

This is a small Android OTP-entry UI. The user enters a code in the six-field form; the activity attaches text watchers that move focus between fields and hide the keyboard after the final digit. The sampled activity shows view setup and focus behavior; the README documents the custom input and automatic advancement. The manifest and layout contents were not sampled, so launch wiring and detailed visual structure are not represented.

Main entry points: [`app/src/main/java/com/rohit/suthar/androidotp/OTPActivity.java`](https://github.com/iamrohitsuthar/otpactivity/blob/master/app/src/main/java/com/rohit/suthar/androidotp/OTPActivity.java) (OTP activity), [`app/src/main/res/layout/activity_otp.xml`](https://github.com/iamrohitsuthar/otpactivity/blob/master/app/src/main/res/layout/activity_otp.xml) (OTP form)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_otp_activity["OTP activity<br/>[OTPActivity.java]"]
node_otp_form["OTP form<br/>[activity_otp.xml]"]
node_keyboard["Android keyboard"]

node_user -->|"enters code"| node_otp_form
node_otp_activity -->|"inflates and watches"| node_otp_form
node_otp_activity -->|"hides keyboard"| node_keyboard

click node_otp_activity "https://github.com/iamrohitsuthar/otpactivity/blob/master/app/src/main/java/com/rohit/suthar/androidotp/OTPActivity.java"
click node_otp_form "https://github.com/iamrohitsuthar/otpactivity/blob/master/app/src/main/res/layout/activity_otp.xml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_user toneBlue
class node_otp_activity,node_otp_form toneTeal
class node_keyboard toneIndigo
```

## Components

### Other components

- **User**
- [OTP activity](https://github.com/iamrohitsuthar/otpactivity/blob/master/app/src/main/java/com/rohit/suthar/androidotp/OTPActivity.java): `app/src/main/java/com/rohit/suthar/androidotp/OTPActivity.java`
- [OTP form](https://github.com/iamrohitsuthar/otpactivity/blob/master/app/src/main/res/layout/activity_otp.xml): `app/src/main/res/layout/activity_otp.xml`
- **Android keyboard**

## Connections

- User → OTP form: enters code (evidence: `README.md`)
- OTP activity → OTP form: inflates and watches (evidence: `app/src/main/java/com/rohit/suthar/androidotp/OTPActivity.java`)
- OTP activity → Android keyboard: hides keyboard (evidence: `app/src/main/java/com/rohit/suthar/androidotp/OTPActivity.java`)
