Introducing the PagerAdapter for swipable tabs
This commit is contained in:
parent
2e472b83f9
commit
f96ace7d3b
5 changed files with 270 additions and 2 deletions
35
app/src/main/res/layout/tabs_viewpager_layout.xml
Normal file
35
app/src/main/res/layout/tabs_viewpager_layout.xml
Normal file
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<TabHost
|
||||
android:id="@android:id/tabhost"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<TabWidget
|
||||
android:id="@android:id/tabs"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@android:id/tabcontent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0"/>
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
</TabHost>
|
||||
</LinearLayout>
|
|
@ -191,5 +191,14 @@
|
|||
<string name="use">Use</string>
|
||||
<string name="no_powers">There are no powers, try creating one</string>
|
||||
<string name="show_stats">Show attack/defense</string>
|
||||
<string name="title_activity_display">Display</string>
|
||||
|
||||
<string name="title_section1">Section 1</string>
|
||||
<string name="title_section2">Section 2</string>
|
||||
<string name="title_section3">Section 3</string>
|
||||
|
||||
<string name="hello_world">Hello world!</string>
|
||||
|
||||
<string name="action_settings">Settings</string>
|
||||
|
||||
</resources>
|
||||
|
|
Reference in a new issue