Skip to content

hotfix: numpad layout to use weights and dynamic screen height#15

Merged
isaacsa51 merged 2 commits into
masterfrom
fix/ui/edit_expense_numpad_height
Jun 12, 2026
Merged

hotfix: numpad layout to use weights and dynamic screen height#15
isaacsa51 merged 2 commits into
masterfrom
fix/ui/edit_expense_numpad_height

Conversation

@isaacsa51

Copy link
Copy Markdown
Owner

Description

Changes made to fix the Numpad layout when editing an existing expense.

Change strategy

Refactored the Numpad component to use a weight-based internal layout instead of fixed row heights, allowing it to scale dynamically to a parent-defined percentage of the screen.

Implemented

  • Refactored Numpad.kt to use Modifier.weight for rows.
  • Updated TransactionEditScreen.kt to calculate and assign exactly 48% of screen height to the numpad.
  • Added safety logic to ensure layout weights are always strictly positive to prevent IllegalArgumentException during transitions.

Working demo

Screen_recording_20260611_215709.webm

Testing

  • Ran ./gradlew :app:compileDebugKotlin :wear:compileDebugKotlin :sync-contract:compileKotlin :app:testDebugUnitTest
  • Added/updated tests when applicable
  • Added screenshots or screen recordings for UI changes

Notes

N/A

Signed-off-by: Isaac Serrano <serranoie99@gmail.com>
@isaacsa51 isaacsa51 self-assigned this Jun 12, 2026
@isaacsa51 isaacsa51 added the bug Something isn't working label Jun 12, 2026
Signed-off-by: Isaac Serrano <serranoie99@gmail.com>
@isaacsa51 isaacsa51 merged commit c6e9372 into master Jun 12, 2026
1 check passed
@isaacsa51 isaacsa51 linked an issue Jun 12, 2026 that may be closed by this pull request
@isaacsa51 isaacsa51 deleted the fix/ui/edit_expense_numpad_height branch June 26, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Editing an existing expense, numpad is being rendered incorrectly

1 participant