viewpager

This commit is contained in:
ScorpioMiku
2018-08-26 17:03:06 +08:00
parent 9ece16e6ea
commit b504741257
14 changed files with 260 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View File

@@ -65,7 +65,29 @@
</LinearLayout>
</android.support.v7.widget.Toolbar>
<com.flyco.tablayout.SlidingTabLayout
android:id="@+id/sliding_tab_layout"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@color/colorPrimary"
android:paddingLeft="10dp"
android:paddingRight="10dp"
app:tl_indicator_corner_radius="1dp"
app:tl_indicator_height="2dp"
app:tl_indicator_width="40dp"
app:tl_tab_space_equal="true">
</com.flyco.tablayout.SlidingTabLayout>
</android.support.design.widget.AppBarLayout>
<com.example.ninefourone.nutritionmaster.ui.NoScrollViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>
</FrameLayout>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="page1" />
</android.support.constraint.ConstraintLayout>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="page2" />
</android.support.constraint.ConstraintLayout>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="page3" />
</android.support.constraint.ConstraintLayout>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="sections">
<item>page1</item>
<item>page2</item>
<item>page3</item>
</string-array>
</resources>