2016-07-29 16 views
0

zeigt ich auf diese ab 2 Tagen arbeite aber noch nicht bekommen, wie dieses Problem zu beheben, In CoordinatorLayout nur FloatingActionButton richtig Verankerung ist, aber ich möchte auf „Ansicht“ Layout i Anker anzuwenden, habe bisher gearbeitet, aber Blick hinter Symbolleiste die Hälfte der Ansicht versteckt ... Bitte helfen Sie .thanks im Vorausandroid CoordinatorLayout layout_anchor nicht richtig

enter image description here

hier 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"/ 

+0

Beitrag vollständige Code des Layouts sein. – Mussa

+0

versuchen Sie es ... 'yourView.bringToFront();' –

+0

fügen Sie Höhe zu Ihrer Ansicht hinzu; 6dp zum Beispiel. – David

Antwort

0

Ansicht ntb_sample sollte bitte ein android.support.design.widget.FloatingActionButton