XML : Coordinator Layout Overlapping Bottom Buttons

I am designing my XML and originally had a Coordinator Layout that was overlapping the Action ToolBar. I read around and found out taht adding the app:layout_behavior="@string/appbar_scrolling_view_behavior attribute helps resolve this issue.

However, in my XML I am still having an issue with the Coordinator Layout overlapping the bottom buttons on the Preview screen. I know these buttons are actually on the phone itself, but I am still puzzled why the layout is extending onto these items. See the below images overlapping the bottom buttons, I don't ever recall seeing this before the introduction of the Coordinator Layout:

  <android.support.design.widget.AppBarLayout      android:layout_width="match_parent"      android:layout_height="wrap_content"      android:theme="@style/AppTheme.AppBarOverlay">        <android.support.v7.widget.Toolbar          android:id="@+id/toolbar"          android:layout_width="match_parent"          android:layout_height="?attr/actionBarSize"          android:background="?attr/colorPrimary"          app:popupTheme="@style/AppTheme.PopupOverlay" />    </android.support.design.widget.AppBarLayout>      <LinearLayout      android:layout_width="match_parent"      android:layout_height="match_parent"      android:orientation="vertical"      app:layout_behavior="@string/appbar_scrolling_view_behavior">        <ImageView          android:layout_width="match_parent"          android:layout_height="0dp"          android:layout_weight="2.2" />        <LinearLayout          app:layout_behavior="@string/appbar_scrolling_view_behavior"          android:layout_width="match_parent"          android:orientation="vertical"          android:layout_height="0dp"          android:layout_weight="2">            <TextView              android:layout_width="match_parent"              android:layout_height="wrap_content"               />            <CheckBox              android:layout_width="match_parent"              android:layout_height="wrap_content"               />        </LinearLayout>        <LinearLayout          android:layout_width="match_parent"          android:layout_height="0dp"          android:layout_weight="1.3">        </LinearLayout>    </LinearLayout>    

See the Layout overlapping the buttons

No comments:

Post a Comment