ganjoorandroid/app/src/main
anas 3486a89b56 Test the rule that chooses the dictionary's container
The guard added in #3 decides whether the dictionary opens beside the poem or as
a sheet over it, and until now nothing proved it. I tried four times to verify it
by hand and failed every time: reaching it needs a tap landing on the glyphs of
one Persian word inside a SelectionContainer, and adb's synthetic taps either
became a long press and opened the selection menu, or landed between words and
opened the couplet's actions instead. The verses are not exposed to uiautomator
either, so there is nothing to aim at.

The arithmetic behind the rule can be tested even though the gesture cannot, so
it moves into a pure function and gets four cases: a tablet keeps the panel, a
foldable open in portrait does not, a phone never gets it however wide the page
is measured, and the boundary sits exactly at the panel plus the minimum measure
(616dp passes, 615dp does not).

No behaviour changes — this is the same expression, named and covered.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-07 18:43:01 +02:00
..
assets Show how a word is pronounced, Classical Persian first 2026-10-04 17:48:12 +02:00
java/com/ganjoor/android Test the rule that chooses the dictionary's container 2026-10-07 18:43:01 +02:00
keepRules Initial Android Studio Compose scaffold 2026-10-03 22:16:22 +02:00
res Add a column layout for tablets and unfolded foldables 2026-10-07 14:05:07 +00:00
AndroidManifest.xml Drop the "ask an assistant" entry from the selection menu 2026-10-04 19:14:22 +02:00