android - LinearLayout overlapping Support CoordinatorLayout -


it's first time use coordinatorlayout, , don't understand how works.

my linearlayout overlapping toolbar, if in framelayout, or relativelayout, , don't know how tell go below ( android:layout_below relativelayout )

here code:

<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/main_content"     android:layout_width="match_parent"     android:layout_height="match_parent">      <android.support.design.widget.appbarlayout         android:id="@+id/appbar"         android:layout_width="match_parent"         android:layout_height="192dp"         android:theme="@style/themeoverlay.appcompat.dark.actionbar">          <android.support.design.widget.collapsingtoolbarlayout             android:id="@+id/collapsing_toolbar"             android:layout_width="match_parent"             android:layout_height="match_parent"             app:contentscrim="?attr/colorprimary"             app:expandedtitlemarginend="64dp"             app:expandedtitlemarginstart="48dp"             app:layout_scrollflags="scroll|exituntilcollapsed">              <imageview                 android:id="@+id/backdrop"                 android:layout_width="match_parent"                 android:layout_height="match_parent"                 android:fitssystemwindows="true"                 android:src="@drawable/logo2"                 app:layout_collapsemode="pin" />              <android.support.v7.widget.toolbar                 android:id="@+id/toolbar"                 android:layout_width="match_parent"                 android:layout_height="?attr/actionbarsize"                 app:layout_collapsemode="pin"                 app:popuptheme="@style/themeoverlay.appcompat.light" />          </android.support.design.widget.collapsingtoolbarlayout>     </android.support.design.widget.appbarlayout>      <linearlayout         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_below="@id/appbar"         android:orientation="vertical"         android:paddingbottom="@dimen/activity_vertical_margin"         android:paddingleft="@dimen/activity_horizontal_margin"         android:paddingright="@dimen/activity_horizontal_margin"         android:paddingtop="@dimen/activity_vertical_margin">              .... large form ...     </linearlayout> </android.support.design.widget.coordinatorlayout> 

another doubt: examples saw coordinatelayout managing recyclerview. layout not recyclerview, long form. make sense doing way?

try nesting content inside of nestedscrollview. don't forget include layout_behavior xml tag.

 <android.support.v4.widget.nestedscrollview          android:layout_width="match_parent"          android:layout_height="match_parent"          app:layout_behavior="@string/appbar_scrolling_view_behavior">       <!-- scrolling content -->   </android.support.v4.widget.nestedscrollview> 

additional resources: http://developer.android.com/reference/android/support/design/widget/appbarlayout.html


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

Kivy: Swiping (Carousel & ScreenManager) -

jdbc - Not able to establish database connection in eclipse -