fix(android): stop pairing-code glyph clip + remove duplicate instruction

- The code's bottom was still clipped: the autosize TextView used wrap_content
  height, which clips glyph bottoms. Give it a fixed 96dp box (autosize 24-64sp,
  gravity center) so the text is centered inside a bounded box and never clipped.
- The "Enter this code…" line appeared twice (static label + statusText). Clear
  statusText when paired so it shows only once, with the code.
This commit is contained in:
ScreenTinker 2026-06-08 19:53:44 -05:00
parent 86340caf9d
commit 60cda97b1d
2 changed files with 9 additions and 9 deletions

View file

@ -143,7 +143,9 @@ class ProvisioningActivity : AppCompatActivity() {
connectBtn.visibility = View.GONE
pairingSection.visibility = View.VISIBLE
pairingCodeText.text = wsService?.getPairingCode() ?: "------"
statusText.text = "Enter this code in the dashboard to pair this display"
// The instruction is shown once, inside the pairing section; don't
// duplicate it in statusText.
statusText.text = ""
connectBtn.isEnabled = false
}
}

View file

@ -102,13 +102,14 @@
android:textSize="16sp"
android:layout_marginBottom="12dp" />
<!-- Auto-sizes between 24sp and 56sp to fit the width on a single line.
Capped at 56sp (not 96sp) + vertical padding so tall digits are
never clipped, and the whole block stays on screen on short phones. -->
<!-- FIXED-height box: autosize fits the text inside the bounded box and
gravity center vertically centers it, so the digits are never
clipped (the earlier wrap_content height clipped the glyph bottoms).
24-64sp fills the width on phones/TVs/sticks. -->
<TextView
android:id="@+id/pairingCodeText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="96dp"
android:text="------"
android:textColor="#3B82F6"
android:textStyle="bold"
@ -116,12 +117,9 @@
android:letterSpacing="0.3"
android:maxLines="1"
android:gravity="center"
android:paddingTop="4dp"
android:paddingBottom="8dp"
android:includeFontPadding="true"
app:autoSizeTextType="uniform"
app:autoSizeMinTextSize="24sp"
app:autoSizeMaxTextSize="56sp"
app:autoSizeMaxTextSize="64sp"
app:autoSizeStepGranularity="2sp" />
<TextView