[英]Multiple Tabs of Android app?
我一直在用eclipse构建一个Android应用程序,它具有滑动手势,我的问题是所有页面出于某种原因都重复,这意味着它们显示的内容与第一个选项卡完全相同。
如何分别处理每个页面? 以及如何使它不重复?
这是代码:
'
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="end"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity$DummySectionFragment" >
<TextView
android:id="@+id/section_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/section_label"
android:layout_alignParentTop="true"
android:text="@string/Hey" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/section_label"
android:layout_below="@+id/section_label"
android:layout_marginTop="22dp"
android:text="@string/Cont." />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView2"
android:layout_centerHorizontal="true"
android:layout_marginTop="120dp"
android:text="@string/con" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView2"
android:layout_below="@+id/textView2"
android:layout_marginTop="41dp"
android:text="@string/believe" />
<TextView
android:id="@+id/section_label2"
android:layout_width="wrap_content"
android:layout_height="wrap_content
/>
'
谢谢
您可能会寻找以下内容: http : //developer.android.com/training/implementing-navigation/lateral.html
请首先查看android开发人员页面,他们有一个很好的文档。
谢谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.