how to implement a sliverAppBar with a tabBar

Use NestedScrollView, here is the working code. @override Widget build(BuildContext context) { return Scaffold( body: DefaultTabController( length: 2, child: NestedScrollView( headerSliverBuilder: (context, value) { return [ SliverAppBar( bottom: TabBar( tabs: [ Tab(icon: Icon(Icons.call), text: “Call”), Tab(icon: Icon(Icons.message), text: “Message”), ], ), ), ]; }, body: TabBarView( children: [ CallPage(), MessagePage(), ], ), ), ), ); … Read more

How to put RecyclerView inside NestedScrollView?

The following is my new updated answer: <android.support.v4.widget.NestedScrollView android:id=”@+id/scrollview” android:layout_width=”match_parent” android:layout_height=”match_parent” android:fillViewport=”true” app:layout_behavior=”@string/appbar_scrolling_view_behavior”> <RelativeLayout android:layout_width=”match_parent” android:layout_height=”wrap_content”> <android.support.v7.widget.CardView android:id=”@+id/cardview1″ android:layout_width=”match_parent” android:layout_height=”wrap_content” android:layout_margin=”@dimen/card_margin”> <LinearLayout style=”@style/Widget.CardContent” android:layout_width=”match_parent” android:layout_height=”wrap_content”> <TextView android:layout_width=”match_parent” android:layout_height=”wrap_content” android:text=”Info CardView1″ android:textAppearance=”@style/TextAppearance.AppCompat.Title” /> <TextView android:layout_width=”match_parent” android:layout_height=”wrap_content” android:text=”@string/cheese_ipsum” /> </LinearLayout> </android.support.v7.widget.CardView> <android.support.v7.widget.CardView android:id=”@+id/cardview2″ android:layout_width=”match_parent” android:layout_height=”wrap_content” android:layout_below=”@+id/cardview1″ android:layout_margin=”@dimen/card_margin”> <LinearLayout style=”@style/Widget.CardContent” android:layout_width=”match_parent” android:layout_height=”wrap_content”> <TextView android:layout_width=”match_parent” android:layout_height=”wrap_content” android:text=”Info CardView2″ android:textAppearance=”@style/TextAppearance.AppCompat.Title” … Read more