답변

0

당신이

<?xml version="1.0" encoding="utf-8"?> 
    <android.support.design.widget.CoordinatorLayout 
    android:id="@+id/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" 
    tools:context=".activity.PlaceDetailsActivity"> 

    <android.support.design.widget.AppBarLayout 
    android:id="@+id/appbarlayout" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:theme="@style/AppTheme.AppBarOverlay" 
    app:layout_behavior="@string/ScrollingAppBarLayoutBehavior"> 

    <android.support.v7.widget.Toolbar 
     android:id="@+id/toolbar" 
     app:title="Results" 
     app:contentInsetStartWithNavigation="0dp" 
     android:layout_width="match_parent" 
     android:layout_height="?attr/actionBarSize" 
     app:popupTheme="@style/AppTheme.PopupOverlay"/> 
</android.support.design.widget.AppBarLayout> 

<android.support.v4.view.ViewPager 
    android:id="@+id/pager" 
    android:layout_width="match_parent" 
    android:layout_height="@dimen/anchor_point" 
    android:fitsSystemWindows="true" 
    android:background="@color/colorAccent" 
    app:layout_behavior="@string/BackDropBottomSheetBehavior"> 
</android.support.v4.view.ViewPager> 

<android.support.v4.widget.NestedScrollView 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="vertical" 
    app:behavior_peekHeight="@dimen/bottom_sheet_peek_height" 
    android:id="@+id/bottom_sheet" 
    app:layout_behavior="@string/BottomSheetBehaviorGoogleMapsLike" 
    app:anchorPoint="@dimen/anchor_point" 
    app:behavior_hideable="false"> 

    <include 
     layout="@layout/bottom_sheet_content" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:fitsSystemWindows="true"/> 
</android.support.v4.widget.NestedScrollView> 

<android.support.design.widget.FloatingActionButton 
    android:id="@+id/fab" 
    android:layout_height="wrap_content" 
    android:layout_width="wrap_content" 
    app:layout_anchor="@id/bottom_sheet" 
    app:layout_anchorGravity="top|right|end" 
    android:src="@drawable/directions_white_24dp" 
    android:layout_margin="@dimen/fab_margin" 
    app:layout_behavior="@string/ScrollAwareFABBehavior" 
    android:clickable="true"/> 

<android.support.design.widget.AppBarLayout 
    android:id="@+id/merged_appbarlayout" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:background="@android:color/transparent" 
    android:theme="@style/AppTheme.AppBarOverlay" 
    android:tag="modal-appbar" 
    app:layout_behavior="@string/MergedAppBarLayoutBehavior"> 
    <FrameLayout 
     android:layout_width="match_parent" 
     android:layout_height="match_parent"> 
     <View 
      android:id="@+id/background" 
      android:layout_width="match_parent" 
      android:layout_height="0dp" 
      android:background="@color/colorPrimary" 
      android:layout_gravity="bottom"/> 
     <android.support.v7.widget.Toolbar 
      android:id="@+id/expanded_toolbar" 
      android:layout_width="match_parent" 
      android:layout_height="?attr/actionBarSize" 
      app:contentInsetStartWithNavigation="0dp" 
      app:popupTheme="@style/AppTheme.PopupOverlay" 
      app:title="@string/key_binding_default_toolbar_name" 
      app:navigationIcon="@drawable/close_white_24dp"/> 
    </FrameLayout> 
    </android.support.design.widget.AppBarLayout> 
    </android.support.design.widget.CoordinatorLayout> 
처럼 사용할 수 있습니다 여기에
<android.support.design.widget.CoordinatorLayout 
xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:app="http://schemas.android.com/apk/res-auto" 
android:id="@+id/htab_maincontent" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:fitsSystemWindows="true"> 

<android.support.design.widget.AppBarLayout 
    android:id="@+id/htab_appbar" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:background="?attr/colorPrimary" 
    android:fitsSystemWindows="true" 
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> 

    <android.support.design.widget.CollapsingToolbarLayout 
     android:id="@+id/htab_collapse_toolbar" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:fitsSystemWindows="true" 
     app:contentScrim="?attr/colorPrimary" 
     app:layout_scrollFlags="scroll|exitUntilCollapsed|snap" 
     app:titleEnabled="false"> 

     <RelativeLayout 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:fitsSystemWindows="true" 
      app:layout_collapseMode="parallax"> 
      <include 
       layout="@layout/layout_header" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent"/> 
     </RelativeLayout> 

     <android.support.v7.widget.Toolbar 
      android:id="@+id/htab_toolbar" 
      android:layout_width="match_parent" 
      android:layout_height="?attr/actionBarSize" 
      android:layout_gravity="top" 
      android:layout_marginBottom="48dp" 
      app:layout_collapseMode="pin" 
      app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> 

     <android.support.design.widget.TabLayout 
      android:id="@+id/htab_tabs" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_gravity="bottom" 
      app:tabIndicatorColor="@android:color/black" 
      app:tabSelectedTextColor="@android:color/black" 
      app:tabTextColor="@android:color/black" 
      android:background="@android:color/white"/> 

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

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

<android.support.v4.view.ViewPager 
    android:id="@+id/htab_viewpager" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    app:layout_behavior="@string/appbar_scrolling_view_behavior" /> 

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

모델에 대한 링크입니다 : 여기

내 레이아웃 코드
+0

"app : la에 대해 알려주세요. yout_behavior " – Suresh

+0

패키지 이름 도트 동작 이름을 strint에 쓰거나 XML에서 동작을 직접 작성하고 필요에 따라 수행 할 수 있습니다 –