All Projects → reline → Google-Maps-BottomSheet

reline / Google-Maps-BottomSheet

Licence: Unlicense license
A BottomSheetBehavior framework mirroring Google Maps'

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Google-Maps-BottomSheet

Superbottomsheet
Android native BottomSheet on steroids 💪
Stars: ✭ 548 (+630.67%)
Mutual labels:  android-ui, bottomsheet
Fabulousfilter
Android library to animate Floating Action Button to Bottom Sheet Dialog and vice-versa
Stars: ✭ 2,477 (+3202.67%)
Mutual labels:  bottomsheet, bottomsheetbehavior
Cornersheet
Behavior to expand view from corner
Stars: ✭ 274 (+265.33%)
Mutual labels:  android-ui, bottomsheet
Bottomsheet
BottomSheet dialog library for Android
Stars: ✭ 219 (+192%)
Mutual labels:  android-ui, bottomsheet
Bottomsheetcoordinatorlayout
A handy CoordinatorLayout that works well when used in a bottom sheet, even with AppBarLayouts inside.
Stars: ✭ 241 (+221.33%)
Mutual labels:  android-ui, bottomsheet
React Native Bottom Sheet Behavior
react-native wrapper for android BottomSheetBehavior
Stars: ✭ 1,068 (+1324%)
Mutual labels:  google-maps, bottomsheet
KotlinProject
This repo help for all developer who want to learn android or want to work on advance feature of android. This repo created with help of @awesomeui, @materialdesign and android latest feature. this repo contain major feature like : @awesome UI, @Material design, @firebase (auth, realtime database, firestore, push notification), @database (Room d…
Stars: ✭ 40 (-46.67%)
Mutual labels:  google-maps, android-ui
AmapLike
【高仿】高德地图 包含定位、搜索、路径规划等功能 map bottomsheet
Stars: ✭ 51 (-32%)
Mutual labels:  bottomsheet, bottomsheetbehavior
Einsen
🎯 Einsen is a prioritization app that uses Eisenhower matrix technique as workflow to prioritize a list of tasks & built to Demonstrate use of Jetpack Compose with Modern Android Architecture Components & MVVM Architecture.
Stars: ✭ 821 (+994.67%)
Mutual labels:  android-ui
CoolAnimation4Beginner
Making Beauty Android UI/UX Design with cool Animation
Stars: ✭ 21 (-72%)
Mutual labels:  android-ui
ZoomLayout
想要缩放、平移的 View,放在 ZoomLayout 中就可以实现了
Stars: ✭ 34 (-54.67%)
Mutual labels:  android-ui
Directions
Directions app for pebble
Stars: ✭ 15 (-80%)
Mutual labels:  google-maps
PaymentCardView
Custom Credit/Debit card view
Stars: ✭ 62 (-17.33%)
Mutual labels:  android-ui
gpedal
Virtually ride indoors with Google Street View and bluetooth bike power meters (Web Bluetooth API)
Stars: ✭ 83 (+10.67%)
Mutual labels:  google-maps
Theme
🎨 An Experimental Theme Engine for Android
Stars: ✭ 89 (+18.67%)
Mutual labels:  android-ui
LicenseTextView
Custom Lincese TextView for android
Stars: ✭ 31 (-58.67%)
Mutual labels:  android-ui
SwipeToReply
Swipe to reply UI like WhatsApp
Stars: ✭ 54 (-28%)
Mutual labels:  android-ui
YuanaItemSettingView
Customizable Item Setting View Android
Stars: ✭ 15 (-80%)
Mutual labels:  android-ui
jquery.geocomplete
A simple plugin for Google Maps Autocomplete.
Stars: ✭ 15 (-80%)
Mutual labels:  google-maps
ui-testing
No description or website provided.
Stars: ✭ 15 (-80%)
Mutual labels:  android-ui

Google Maps BottomSheet Behavior

A BottomSheetBehavior framework mirroring Google Maps

Demo

Demo

Usage

Initializing and modifying a GoogleMapsBottomSheetBehavior is the same as the BottomSheetBehavior from the support library

View bottomsheet = findViewById(R.id.bottomsheet);
GoogleMapsBottomSheetBehavior behavior = GoogleMapsBottomSheetBehavior.from(bottomsheet);
behavior.setPeekHeight(200); // in pixels
// or use the default peek height, which is different from the support library
behavior.setPeekHeight(PEEK_HEIGHT_AUTO);
behavior.setState(GoogleMapsBottomSheetBehavior.STATE_COLLAPSED);
behavior.setHideable(false);
<android.support.v4.widget.NestedScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/bottomsheet"
    android:background="@android:color/white"
    android:layout_gravity="bottom"
    app:behavior_hideable="true"
    app:behavior_peekHeight="100dp"
    app:layout_behavior="com.github.reline.GoogleMapsBottomSheetBehavior">
    ...
</android.support.v4.widget.NestedScrollView>

Framework features

Anchoring

Using the offset from the top of the parent view

behavior.setAnchorOffset(200); // in pixels

or set the actual height of the bottomsheet when it is anchored

app:behavior_anchorHeight="200dp"
<!-- or use the default 16:9 ratio keyline -->
app:behavior_anchorHeight="auto"
behavior.setAnchorHeight(1100); // in pixels
// or use the default 16:9 ratio keyline
behavior.setAnchorHeight(ANCHOR_HEIGHT_AUTO);
Parallax
View parallax = ...;
behavior.setParallax(parallax);
<View
    android:id="@+id/parallax"
    android:layout_width="match_parent"
    android:layout_height="200dp"
    android:background="@color/colorPrimaryDark"/>

TIP: Use behavior.getAnchorOffset() to make the parallax fill the entire gap between the anchor and the top of the screen.

LayoutParams layoutParams = new LayoutParams(parallax.getMeasuredWidth(), behavior.getAnchorOffset());
parallax.setLayoutParams(layoutParams);
Custom Header/Content and Color Animations

Color animations can easily be handled by the framework if given a header and content view.

Be advised, when using a custom heading/content view a child should not be provided to the bottom sheet.

<android.support.v4.widget.NestedScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/bottomsheet"
    android:background="@android:color/white"
    android:layout_gravity="bottom"
    app:behavior_hideable="true"
    app:behavior_peekHeight="100dp"
    app:behavior_anchorHeight="auto"
    app:behavior_header_layout="@layout/custom_header"
    app:behavior_content_layout="@layout/custom_content"
    app:behavior_anchorColor="@color/colorPrimary"
    app:behavior_collapsedColor="@android:color/white"
    app:layout_behavior="com.github.reline.GoogleMapsBottomSheetBehavior" />

Gradle

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

dependencies {
    implementation 'com.github.reline:google-maps-bottomsheet:1.0'
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].