viewpager
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 51 KiB |
@@ -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>
|
||||
|
||||
|
||||
11
app/src/main/res/layout/page_1.xml
Normal file
11
app/src/main/res/layout/page_1.xml
Normal 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>
|
||||
10
app/src/main/res/layout/page_2.xml
Normal file
10
app/src/main/res/layout/page_2.xml
Normal 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>
|
||||
10
app/src/main/res/layout/page_3.xml
Normal file
10
app/src/main/res/layout/page_3.xml
Normal 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>
|
||||
8
app/src/main/res/values/arrays.xml
Normal file
8
app/src/main/res/values/arrays.xml
Normal 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>
|
||||
Reference in New Issue
Block a user