Skip to content

Instantly share code, notes, and snippets.

@mattiaferigutti
Last active November 6, 2020 10:04
Show Gist options
  • Select an option

  • Save mattiaferigutti/de26536971f0fdaf88ff668031721021 to your computer and use it in GitHub Desktop.

Select an option

Save mattiaferigutti/de26536971f0fdaf88ff668031721021 to your computer and use it in GitHub Desktop.
BackDrop in Android
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/main_container"
android:background="@color/purple_500"
tools:context=".MainActivity">
<fragment
android:elevation="1dp"
app:behavior_peekHeight="70dp"
android:id="@+id/filter_fragment"
android:name="com.mattiaferigutti.backdrop.WindowFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:behavior_skipCollapsed="true"
app:layout_behavior=".GestureLockedBottomSheetBehavior"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment