diff options
author | Alex Ning <chineseperson5@gmail.com> | 2019-07-29 14:02:37 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2019-07-29 14:02:37 +0000 |
commit | 453501b1ba4fd32458abe4b5a008130f74a86ff3 (patch) | |
tree | c906cc2abb110add0e9836bb3e54ce24c0b34c93 /app/src/main/res | |
parent | 111ba8e5fc95c3fb5dbbff472e1a8dbbb52a28af (diff) | |
download | infinity-for-reddit-453501b1ba4fd32458abe4b5a008130f74a86ff3.tar infinity-for-reddit-453501b1ba4fd32458abe4b5a008130f74a86ff3.tar.gz infinity-for-reddit-453501b1ba4fd32458abe4b5a008130f74a86ff3.tar.bz2 infinity-for-reddit-453501b1ba4fd32458abe4b5a008130f74a86ff3.tar.lz infinity-for-reddit-453501b1ba4fd32458abe4b5a008130f74a86ff3.tar.xz infinity-for-reddit-453501b1ba4fd32458abe4b5a008130f74a86ff3.tar.zst infinity-for-reddit-453501b1ba4fd32458abe4b5a008130f74a86ff3.zip |
Add a ViewPager in MainActivity to display popular posts.
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/app_bar_main.xml | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/app/src/main/res/layout/app_bar_main.xml b/app/src/main/res/layout/app_bar_main.xml index 50f1384f..530663ca 100644 --- a/app/src/main/res/layout/app_bar_main.xml +++ b/app/src/main/res/layout/app_bar_main.xml @@ -50,6 +50,22 @@ </com.google.android.material.appbar.CollapsingToolbarLayout> + <com.google.android.material.tabs.TabLayout + android:id="@+id/tab_layout_main_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="bottom" + android:background="@color/colorPrimary" + app:layout_scrollFlags="scroll|enterAlways" + app:tabGravity="fill" + app:tabMode="fixed" + app:tabIndicatorColor="@android:color/white" + app:tabIndicatorHeight="3dp" + app:tabSelectedTextColor="@android:color/white" + app:tabTextColor="@android:color/white" + app:tabRippleColor="?attr/colorControlHighlight" + app:tabUnboundedRipple="false" /> + </com.google.android.material.appbar.AppBarLayout> <View @@ -60,7 +76,13 @@ android:elevation="1dp" android:visibility="gone"/> - <include layout="@layout/content_main" /> + <!--<include layout="@layout/content_main" />--> + + <androidx.viewpager.widget.ViewPager + android:id="@+id/view_pager_main_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:layout_behavior="@string/appbar_scrolling_view_behavior" /> <com.google.android.material.floatingactionbutton.FloatingActionButton android:id="@+id/fab_main_activity" |