hex/android/app
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel 190b099610
Android keyboard: beside a dictation's note, Undo is its ↶ alone, so the note can be read (#2771)
* Android keyboard: beside a dictation's note, Undo is its ↶ alone, so the note can be read

What: while a dictation's note ("Stopped at 1 minute", the low-memory note) shares the strip's line with Undo
dictation, the chip shows only its ↶ icon, named "Undo dictation" for TalkBack, with the same 30 dp height and its tap
unchanged. The note may then take two lines. Once the note goes, the chip has its words again and the line is one.

Why: at 360 dp the note had about 99 dp beside the full chip, so even "Stopped at 1 minute" (123 dp at font 1.0)
was cut off, and the low-memory note read "Phone was lo…". The icon-only chip is about 42 dp instead of about 154,
leaving the note about 210 dp a line. Ryan chose this (option A) over giving the note a line of its own.

How: undoLook(shared) decides the chip's label and the note's lines; StripView applies them in update(), setting
the chip's text only when it changes.

Not covered: at font 1.3 the English low-memory note (about 507 dp) needs three lines, so it is still cut; that
needs shorter wording, which is Ryan's to approve.

Verified: assembleDebug and testDebugUnitTest pass (292 tests). New case in StripTextTest. Not yet on an emulator:
the Studio is held by the release gate; the before and after screenshots at 360 dp follow.

* Android keyboard: the low-memory note reads "Low on memory: used standard dictation."

What: the English note shown when a shortage of memory sent an English dictation to the standard model changes from
"Phone was low on memory, so this one used standard dictation." to "Low on memory: used standard dictation." (Ryan's
wording), in strings_keyboard.xml and in Whisper.kt's LOW_MEMORY_NOTE, which HexKeyboard maps to that string.

Why: beside Undo's ↶ at 360 dp the note has about 205 dp a line at font 1.3. The old sentence needed about 507 dp,
three lines, so it was still cut off; the new one needs about 329 dp, two lines (253 dp at font 1.0).

Unchanged: the Chinese note (手机内存不足,本次使用了标准听写。), which says the same and fits in two lines, and the
Diagnostics report's line, which is a report line, not this note.

Verified: assembleDebug and testDebugUnitTest pass on dev at 0d3176dc6 (293 tests).

* Android keyboard: a two-line note beside Undo sits close enough to fit at font 1.3

What: when a dictation's note takes two lines beside Undo's ↶, its lines are set at 0.85 spacing without the font's
extra padding; one line is as before. Only applied when the line count changes.

Why: on the emulator at 360 dp and font size 1.3, the low-memory note's second line ("standard dictation.") was cut
at the bottom by the keys: two lines of 18 sp need about 44 dp at normal spacing, and the strip is 44.25 dp with its
content set a little above the middle.

Verified: screenshots at 360 dp follow in the pull request; build and tests on the Studio.

* Android keyboard: a two-line note beside Undo shrinks only as far as it must to fit

What: while a dictation's note takes two lines beside Undo's ↶, its text size fits itself to the strip, from 14 sp
down to 10 sp. With one line it is 14 sp as before.

Why: on the emulator at 360 dp and font size 1.3, the Chinese low-memory note's second line (了标准听写。) was still cut
at the bottom even at 0.85 line spacing, since Chinese sets taller lines than Inter. The English note already fits
and keeps its size.

Verified: screenshots at 360 dp in English and Chinese, font 1.0 and 1.3, in the pull request; build and tests on the
Studio.
2026-11-24 18:39:02 -05:00
..
src Android keyboard: beside a dictation's note, Undo is its ↶ alone, so the note can be read (#2771) 2026-11-24 18:39:02 -05:00
build.gradle.kts Android: faster English dictation (Labs) (#2704) 2026-11-24 13:36:38 -05:00
proguard-rules.pro Android: faster English dictation (Labs) (#2704) 2026-11-24 13:36:38 -05:00