看看这个: http ://www.eurodroid.com/pics/android_foursquare_update_1.jpg
有人知道这个布局是如何构成的吗?是一个3选项卡布局,但是这个选项卡的内容?是一个表,一个ListAdapter,是什么?
十分感谢。
看看这个: http ://www.eurodroid.com/pics/android_foursquare_update_1.jpg
有人知道这个布局是如何构成的吗?是一个3选项卡布局,但是这个选项卡的内容?是一个表,一个ListAdapter,是什么?
十分感谢。
适用于 Android 的 Foursquare 应用程序是开源的。 我相信您正在寻找的是他们的main_activity.xml:
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<!-- Background color should be the last value in the selected tab gradient. -->
<LinearLayout
android:id="@+id/tabBackground"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="0dip"
android:background="#4d4d4d">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<!-- A paddingTop of zero will remove the strip below the tabs. -->
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="5dip" />
</LinearLayout>
</TabHost>
该选项卡的内容具体来说只是一个自定义的 ListView。正如 Bryan 所指出的,您可以浏览源代码以查看他们使用的确切 XML 布局。