How can I mimic the bottom sheet from the Maps app?
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Understanding Bottom Sheets
Bottom sheets are UI components primarily used to display content that can be partially hidden, allowing for more space management within applications. They are a popular component in mobile apps for presenting content without disrupting the current screen view. The Maps app, on both Android and iOS platforms, utilizes bottom sheets to provide additional information or controls, making the user experience seamless. To mimic this feature, it's essential to understand the types of bottom sheets and their implementation.
Types of Bottom Sheets
- Persistent Bottom Sheet: This type remains visible and is usually anchored at the bottom of the screen. Users can interact with this sheet without losing sight of the main content. Typical use includes displaying additional navigation links or app controls.
- Modal Bottom Sheet: This sheet overlays content and requires user interaction to dismiss. It's often used to display options or actions that require focus, such as sorting or filtering options.
- Expanding Bottom Sheet: A variant of the persistent bottom sheet that can expand to cover a significant portion of the screen when interacted with.
Implementing Bottom Sheets
Android Implementation
In Android, bottom sheets are part of the Material Design components and can be implemented using BottomSheetDialogFragment or BottomSheetBehavior.
- BottomSheetDialogFragment: Used for modal sheets. It provides a simple way to create a bottom sheet as a dialog, overlaying on top of current content.
- BottomSheetBehavior: Used for persistent or expanding sheets. This requires applying behavior to a
CoordinatorLayout.
iOS Implementation
For iOS, bottom sheets can be implemented using UIViewController as a custom container or by using the UISheetPresentationController.
- Custom UIViewController: Provides more flexibility for customizing.
- UISheetPresentationController: Available from iOS 15+, it simplifies the implementation with built-in detents and states.
Best Practices
- User Interaction: Ensure that interacting with the bottom sheet is intuitive. Dragging gestures should respond smoothly to user input.
- Adaptive Layouts: Use AutoLayout (iOS) or ConstraintLayout (Android) to ensure content fits on different screen sizes.
- Performance Optimization: Load data asynchronously if the bottom sheet displays dynamic content to avoid freezing the UI during presentation.
Key Differences
| Feature | Android | iOS |
| Component Availability | Part of Material Components | Available from iOS 15 with UISheetPresentationController |
| Interaction Handling | BottomSheetBehavior and gestures | UISheetPresentationController using detents
Custom implementation possible |
| Use Cases | Modal, Persistent, Expanding | Mostly Modal and Standard customization |
| Flexibility | High with BottomSheetBehavior | Limited by iOS version compatibility |
Enhancements
- Animations: Add smooth transition animations to enhance the visibility and aesthetic of the bottom sheet.
- Accessibility: Implement accessibility features such as voice control compatibility and text size adjustments.
- Dynamic Content: Use live data to update the bottom sheet's content dynamically to provide more relevant and timely information.
By utilizing these strategies and techniques, developers can effectively mimic the bottom sheet behavior found in the Maps app, creating a user-friendly and functional UI component in their applications.

