feat(PlaceDetailsCompose): Enhance Place Details Compose sample#988
Merged
feat(PlaceDetailsCompose): Enhance Place Details Compose sample#988
Conversation
- Switch to built-in My Location button in MapScreen - Fix coordinate mode to use loadWithCoordinates in PlaceDetailsView - Style dismiss button with semi-transparent background - Fix gap in PlaceDetailsFullView by using fillMaxSize - Update MapViewModel to handle coordinate mode toggle
Introduces the ability for users to select which content fields are displayed in the Place Details Compact and Full views. - **MapScreen.kt**: - Implemented state for content selection dialog visibility and selected content. - Added a "Select Fields" button to trigger the content selection dialog. - Updated `PlaceDetailsCompactView` and `PlaceDetailsFullView` to accept dynamic content lists. - Integrated `PlaceContentSelectionDialog` to allow users to choose fields for both compact and full views. - **PlaceDetailsView.kt**: - Modified `PlaceDetailsCompactView` and `PlaceDetailsFullView` to utilize the `content` parameter when creating `PlaceDetailsCompactFragment` and `PlaceDetailsFragment` instances respectively. - Ensured proper fragment lifecycle management within `AndroidView` for `PlaceDetailsFullView`. - **MapViewModel.kt**: - Added `MutableStateFlow` to manage the selected content for both compact and full place details views. - Provided `updateCompactContent` and `updateFullContent` functions to modify these selections. - **PlaceContentSelectionDialog.kt**: - Implemented the `PlaceContentSelectionDialog` to allow users to select content fields from a list of available options. This enhancement allows for greater flexibility and customization of the displayed place information.
Added the standard Google LLC copyright header to the file PlaceDetailsCompose/app/src/main/java/com/example/placedetailscompose/ui/map/PlaceContentSelectionDialog.kt to ensure proper licensing.
- Created ARCHITECTURE.md with junior developer tips - Extracted hardcoded strings to strings.xml - Verified build and launch
- Replaced custom column with Material 3 ElevatedCard. - Improved spacing and layout for toggles. - Changed toggle arrangement to use spacedBy for better grouping.
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.
Enhance Place Details View with Customization and UI Polish
This pull request introduces significant enhancements to the Place Details experience, focusing on user customization and UI refinement.
The primary new feature allows users to dynamically select which content fields (e.g., address, phone number, website) are displayed in both the
compact and full Place Details views. This provides greater flexibility and a more tailored experience.
Key Changes:
feat: Customizable Place Content Selection
refactor: Improved Fragment Handling
style: UI Refinements & Polish
fix: Addressed Coordinate Mode and Layout Issues