我已经开始致力于Android材质设计支持库,并且作为新手我有一些混淆。而且,需要你的帮助。 :)app:layout_scrollFlags =“scroll | enterAlways”不适用于LinearLayout
1)LinearLayout可以使用layout_scrollFlags="scroll|enterAlways"
吗?
2)我想要一个LinearLayout就在工具栏下面。我使用AppBarLayout实现了它,但是我想滚动LinearLayout而不是滚动LinearLayout下面的内容的工具栏。在LinearLayout上使用layout_scrollFlags="scroll|enterAlways"
不起作用。
3)我们可以在AppBarLayout的CoordinatorLAyout和Toolbar中使用多个AppBarLayout吗?
<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">
<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" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp"
app:layout_scrollFlags="scroll|enterAlways">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TextView : 1 " />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TextView : 2" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TextView : 3" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TextView : 4" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TextView : 5" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TextView : 6" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TextView : 7" />
</LinearLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>
实施SaravInfern的解决方案后,这里是我取得了那么远,
我想隐藏LinearLayout滚动后不工具栏 – Jaydeep
https://youtu.be/enWVNP3Gifg我想这样的事情,唯一的区别是我想要LinearLayout和textViews里面它,这个视频有一个tabLayout – Jaydeep
你的答案不给出所需的输出... – Jaydeep