From d6c9a843d45f515df384309090787aa0ca1a8515 Mon Sep 17 00:00:00 2001 From: Luis Guzman Date: Thu, 20 Aug 2026 14:48:53 -0600 Subject: [PATCH] ADFA-5183 fix(connect): enlarge the direct-URL fallback so it can be read and typed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The scan-fallback text — the server URL http://:8085, and in hotspot mode the Wi-Fi name + password — was on the default TextView size, too small to copy a run of digits for users without a QR scanner (e.g. the Itel phones in Nigeria). Put the values on the M3 type scale at TitleLarge, and nudge the "scan didn't work" toggle one step up (BodySmall -> BodyMedium), via M3Text (no fixed sp). QrSection is shared, so Connect and Clone both get it; this also covers the font half of ADFA-5181 (hotspot password). The URL stays reveal-on-tap, hidden by default. --- .../org/iiab/controller/redesign/QrSection.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/controller/app/src/main/java/org/iiab/controller/redesign/QrSection.java b/controller/app/src/main/java/org/iiab/controller/redesign/QrSection.java index c70e7b4a5..f3d7314f0 100644 --- a/controller/app/src/main/java/org/iiab/controller/redesign/QrSection.java +++ b/controller/app/src/main/java/org/iiab/controller/redesign/QrSection.java @@ -21,6 +21,7 @@ import org.iiab.controller.R; import org.iiab.controller.sync.transport.QrCodec; +import org.iiab.controller.util.M3Text; /** * ADFA-5157: extracted from ConnectFragment (ADFA-5154), where it lived as a private @@ -83,10 +84,22 @@ public void setFallback(Context ctx, String[] vals) { TextView t = new TextView(ctx); t.setText(val); t.setGravity(Gravity.CENTER); - t.setTextColor(ContextCompat.getColor(ctx, R.color.k2go_ink)); + // ADFA-5183: the fallback carries what a user without a QR scanner has to READ AND TYPE — + // the server URL (http://:8085), and the hotspot Wi-Fi name + password (ADFA-5181). + // The default TextView size is too small to copy a run of digits from; put it on the M3 + // type scale at TitleLarge via M3Text (which re-applies the theme colour after the + // appearance, per ADFA-4961) instead of a fixed sp. Enlarges every fallback value, so it + // covers both the URL (5183) and the password (5181's font half). + M3Text.apply(t, com.google.android.material.R.style.TextAppearance_Material3_TitleLarge, + ContextCompat.getColor(ctx, R.color.k2go_ink)); t.setTextIsSelectable(true); fallbackValues.addView(t); } + // ADFA-5183: the "scan didn't work" toggle is the pointer to the fallback, not extra clutter — + // it stays reveal-on-tap and hidden by default, but it was on the smallest role too, so nudge + // it one M3 step up (BodySmall -> BodyMedium) to be easy to find, keeping its teal action colour. + M3Text.apply(fallbackToggle, com.google.android.material.R.style.TextAppearance_Material3_BodyMedium, + ContextCompat.getColor(ctx, R.color.k2go_teal)); fallbackToggle.setVisibility(View.VISIBLE); applyFallbackOpen(ctx); fallbackToggle.setOnClickListener(x -> { fbOpen = !fbOpen; applyFallbackOpen(ctx); });