0

I am working on this from 2 days but still not getting how to fix this, In CoordinatorLayout only FloatingActionButton is properly anchoring but i want to apply anchor on "View" layout, i've worked so far but view is hiding half of view behind toolbar... Please help ..Thanks in Advance

enter image description here

here is Layout

<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"
tools:context="com.rvsoftcorp.zetaride.MainActivity">
   <android.support.design.widget.AppBarLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:theme="@style/AppTheme.AppBarOverlay"
    android:id="@+id/app_bar">
           <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="170dp"
            android:background="?attr/colorPrimaryDark"
            app:popupTheme="@style/AppTheme.PopupOverlay"
            android:alpha="0.9"></android.support.v7.widget.Toolbar>
  </android.support.design.widget.AppBarLayout>
  <View
    android:id="@+id/ntb_sample_5"
    android:layout_width="100dp"
    android:layout_height="50dp"
    android:layout_margin="@dimen/fab_margin"
    app:layout_anchor="@id/toolbar"
    app:layout_anchorGravity="bottom|end"/

RVorine
  • 49
  • 1
  • 10

1 Answers1

0

View ntb_sample should be an android.support.design.widget.FloatingActionButton

Wiebe Elsinga
  • 386
  • 3
  • 15