System message dynamic height#23
Merged
Android-PowerUser merged 3 commits intofeature/purchase-thank-you-messagefrom Jun 1, 2025
Merged
System message dynamic height#23Android-PowerUser merged 3 commits intofeature/purchase-thank-you-messagefrom
Android-PowerUser merged 3 commits intofeature/purchase-thank-you-messagefrom
Conversation
Implements dynamic height changes for the system message text field in the PhotoReasoningScreen based on focus and keyboard visibility: - Focused + Keyboard open: 600dp - Focused + Keyboard closed: 1000dp - Not focused: 120dp Additionally, modifies back button behavior: - If the system message field is focused with the keyboard closed (1000dp height), the first back press deselects the field, changing its height to 120dp. - Subsequent back presses perform the default navigation. Keyboard visibility is detected in MainActivity and propagated to the PhotoReasoningScreen.
Adds the import `androidx.compose.ui.focus.onFocusChanged` to `PhotoReasoningScreen.kt` to resolve a build compilation error.
Addresses your feedback on the system message TextField in PhotoReasoningScreen: - Sets focused height with keyboard to 450dp (was 600dp). - Dynamically adjusts minLines and maxLines of the OutlinedTextField to ensure the text input area expands with the component's height. - Modifies the BackHandler to explicitly clear focus from the TextField (in addition to collapsing it) when it's focused without the keyboard and back is pressed. This ensures it can be re-expanded correctly on subsequent focus. These changes improve the usability and appearance of the system message input field.
8a7e935
into
feature/purchase-thank-you-message
1 check passed
Android-PowerUser
added a commit
that referenced
this pull request
Jun 1, 2025
* feat: Display thank you message on purchase I modified MainScreen (MenuScreen.kt) to display a "Thank you" message when the app has been purchased. Changes: - Added `isPurchased` parameter to `MenuScreen`. - `MainActivity` now passes the purchase status (`currentTrialState == TrialManager.TrialState.PURCHASED`) to `MenuScreen`. - In `MenuScreen`, if `isPurchased` is true, the donation button and related text are replaced with "Thank you for supporting the development! 🎉💛". - Added a new preview for the purchased state in `MenuScreen.kt`. * System message dynamic height (#23) * feat: Adjust system message height and back button behavior Implements dynamic height changes for the system message text field in the PhotoReasoningScreen based on focus and keyboard visibility: - Focused + Keyboard open: 600dp - Focused + Keyboard closed: 1000dp - Not focused: 120dp Additionally, modifies back button behavior: - If the system message field is focused with the keyboard closed (1000dp height), the first back press deselects the field, changing its height to 120dp. - Subsequent back presses perform the default navigation. Keyboard visibility is detected in MainActivity and propagated to the PhotoReasoningScreen. * fix: Add missing import for onFocusChanged Adds the import `androidx.compose.ui.focus.onFocusChanged` to `PhotoReasoningScreen.kt` to resolve a build compilation error. * fix: Correct system message TextField behavior Addresses your feedback on the system message TextField in PhotoReasoningScreen: - Sets focused height with keyboard to 450dp (was 600dp). - Dynamically adjusts minLines and maxLines of the OutlinedTextField to ensure the text input area expands with the component's height. - Modifies the BackHandler to explicitly clear focus from the TextField (in addition to collapsing it) when it's focused without the keyboard and back is pressed. This ensures it can be re-expanded correctly on subsequent focus. These changes improve the usability and appearance of the system message input field. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
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.
No description provided.