`
<android.support.design.widget.CoordinatorLayout
android:id="@+id/coordinator"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.Dark">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
app:titleTextAppearance="@style/ToolbarTitle"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:layout_gravity="start"
android:textColor="@color/hedarcolor"
android:textSize="18sp"
android:gravity="center"
android:id="@+id/toolbar_title" />
<ImageView
android:id="@+id/hederimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_gravity="center"
android:src="@drawable/frow_logo"/>
</android.support.v7.widget.Toolbar>
<FrameLayout
android:id="@+id/containerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorPrimary"
app:tabGravity="fill">
<View
android:layout_width="match_parent"
android:layout_height="3dp"
android:background="@drawable/toolbar_dropshadow" />
</FrameLayout>
</android.support.design.widget.AppBarLayout>
</android.support.design.widget.CoordinatorLayout>
<android.support.design.widget.NavigationView
android:id="@+id/navigation_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:itemBackground="@drawable/drawer_list_selector"
app:headerLayout="@layout/header"
app:menu="@menu/drawer_menu"/>
Android中的 I am animating toolbar on scroll using
Recycleview`,它会在我的布局底部的图像中留下空格。
试图
答案 0 :(得分:0)
CoordinatorLayout= (CoordinatorLayout) v.findViewById(R.id.cl_my_account);
Display display = getActivity().getWindowManager().getDefaultDisplay();
CoordinatorLayout.setMinimumHeight(display.getHeight());