Conversation
- Remove temporary android:screenOrientation="portrait" lock from manifest
- Add orientation detection in CalculatorScreen using LocalConfiguration
- Landscape layout: Column with compact 2-line display (expression + value)
at top-right and full-width keypad below; display height is fixed so the
keyboard never shifts when expression appears or disappears
- Landscape keypad: 5-column × 4-row grid of pill-shaped (stadium) buttons
sized via BoxWithConstraints to fill available height/width exactly;
button arrangement mirrors the reference design:
Row 1: 7 8 9 ⌫ ÷
Row 2: 4 5 6 AC ×
Row 3: 1 2 3 % −
Row 4: +/− 0 . = +
- Portrait layout unchanged; refactored into PortraitKeypadLayout with
clean BoxWithConstraints sizing and fixed WideCalcButton width formula
(buttonSize×2 + spacing) that eliminates the previous 6dp row overflow
- CalculatorDisplay extracted as private composable shared by both orientations
danascape
requested changes
Apr 11, 2026
| // ───────────────────────────────────────────────────────────────────────────── | ||
| // Portrait layout — 4 columns × 5 rows of circular buttons (original design) | ||
| // | ||
| // Row 1: AC +/− % ÷ |
Collaborator
Author
|
@danascape i have removed the comments |
Member
|
@sxivansx squash the last 2 commits to base landscape fix, keeping CLAUDE.md separate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3
Summary
android:screenOrientation="portrait"manifest lock added in commitd1d19c8What changes
AndroidManifest.xmlRemoves
screenOrientation="portrait"fromMainActivity.CalculatorScreen.ktLocalConfiguration.current.orientationCalculatorDisplaycomposable shared by both orientationsColumn: compact two-line display (expression + value, fixed height so keyboard never shifts) at top-right, then full-width keypad withweight(1f)Column: identical layout to before (weight(1f)display, keypad below)CalculatorKeypad.ktRefactored into two private layout functions:
LandscapeKeypadLayout— 5 columns × 4 rows of pill-shaped buttons:BoxWithConstraintsmeasures real available space;btnWidthandbtnHeightare derived so all 4 rows fill the screen exactly on every device.⌫wires up the existingonBackspacecallback that was previously unused.PortraitKeypadLayout— visually unchanged 4 × 5 circular layout.WideCalcButtonwidth changed fromfillMaxWidth(0.5f)(which overflowed by0.5 × spacing) to the mathematically exactbuttonSize × 2 + spacing.Test plan
0, expression / display behaviour intact