-1

How I can make this:

enter image description here

But expand from bottom??? I was try BottomSheetBehavior, but BottomSheet overlays content.

dima
  • 29
  • 1
  • 7

1 Answers1

0

You can try this. It looks like a CollapasingToolbarLayout:

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.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:fitsSystemWindows="true">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/app_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:fitsSystemWindows="true">

        <android.support.design.widget.CollapsingToolbarLayout
            android:id="@+id/toolbar_layout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fitsSystemWindows="true"
            app:contentScrim="?attr/colorPrimary"
            app:layout_scrollFlags="scroll|enterAlways"> // added this

            <android.support.v7.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize" />

        </android.support.design.widget.CollapsingToolbarLayout>
    </android.support.design.widget.AppBarLayout>

    <include layout="@layout/content_scrolling" /> // your content

</android.support.design.widget.CoordinatorLayout>

Check the samples here: http://saulmm.github.io/mastering-coordinator

ʍѳђઽ૯ท
  • 15,369
  • 7
  • 47
  • 103
  • this example for expand from TOP to BOTTOM, but I want from BOTTOM to TOP like BottomSheetBehavior without overdraw on content. – dima Oct 11 '18 at 17:22
  • this is still an appbar that expands from below =) the added flags are responsible for the display behavior, but not the location – dima Oct 16 '18 at 04:08