Lay the scorekeeper out as a score sheet
The same sheet, drawn as the paper it replaces: a column per player with their name at the head, a row per round running down the page, and the running total ruled off at the foot. The bottom row is always the one being filled in. Finishing it writes it down and opens a fresh empty row above the totals, so the place to type is always in the same spot. The head and the totals sit outside the scrolling rounds and share one horizontal scroll state with them, which is what keeps a column and the name over it from ever coming apart — every row is built by the same composable and is therefore exactly the same width, which is what lets them share it. Reordering moves to where a spreadsheet puts it: drag a name sideways and the whole column travels with it. Tapping a name renames it or removes that player, tapping a round number down the left edge opens that row for correction, and a + column at the right adds a player. The mode toggle and the round dialog are gone with them. Points still go in as typed text until the row is finished, so a half-typed minus is not a number yet. The ± button flips the last number typed: not every keyboard offers a minus on its number pad, and taking points away has to work on all of them. adjustResize is now stated in the manifest rather than left to the system to resolve. This screen types into the bottom row with the totals and the finish button below it, and they have to stay above the keyboard rather than being panned off the screen. The model is untouched: ScoreSheet and its tests did not need to change for any of this, which is the point of it having no Android in it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019Pr6B8xDDtJJcb6WJMw7Ud
This commit is contained in:
@@ -22,11 +22,18 @@
|
||||
|
||||
<!-- No fixed orientation: the UI adapts to portrait, landscape and
|
||||
tablet widths. configChanges keeps Compose state across rotation
|
||||
instead of tearing the activity down mid-hand. -->
|
||||
instead of tearing the activity down mid-hand.
|
||||
|
||||
adjustResize is stated rather than left to the system to resolve:
|
||||
the scorekeeper types into the bottom row of its sheet, and the
|
||||
totals and the button that finishes the round sit below that. The
|
||||
window has to shrink so they stay above the keyboard rather than
|
||||
being panned off the screen. -->
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|density">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
Reference in New Issue
Block a user