Reputation: 47
How can i achieve this design (the yellow arrow) ? and (the orange arrow) ? is it a listview ? Thanks in advance!
Upvotes: 0
Views: 2005
Reputation: 7868
You can use one tablayout and one recyclerview for this purpose. or you can used NestedScrollView.
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusableInTouchMode="true"
android:orientation="vertical">
<android.support.design.widget.TabLayout
android:id="@+id/fragment_manager_tab_bar_tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabGravity="fill"
app:tabMode="fixed"
app:tabTextColor="@color/tab_inactive"
app:tabSelectedTextColor="@color/tab_active"
app:tabIndicatorColor="@color/tab_active" />
<android.support.v7.widget.RecyclerView
android:id="@+id/product_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:scrollbars="none" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
More first fragment_manager_tab_bar_tab_layout display here View Card, Scan and Add Money and product_list you can display Linear Layout Vertical.
More full code, you can reference:
https://inducesmile.com/android-tips/android-recyclerview-inside-nestedscrollview-example/
and this one is also help for your:
http://android-pratap.blogspot.com/2015/12/horizontal-recyclerview-in-vertical.html
Don't Miss this:
https://mzgreen.github.io/2015/02/28/How-to-hideshow-Toolbar-when-list-is-scrolling(part2)/
Upvotes: 2