我想添加一个页脚视图,一个列表视图中加载的元素的计数器。我想知道我应该把页脚视图放在哪里。我的列表视图中已经有一个,我想我不能把它放在那里,因为我希望它一直可见,而不是像我所拥有的那样深入到它的底部。
代码:
列表显示:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<ListView
android:id="@+id/lista"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stackFromBottom="false"
android:transcriptMode="normal"
/>
</LinearLayout>
选项卡的代码:
<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: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=".MainTabActivity" >
<TabHost
android:id="@android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|fill_vertical|fill_horizontal" >
</TabWidget>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:id="@+id/tab1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/lista"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stackFromBottom="false"
android:transcriptMode="normal"
/>
</LinearLayout>
<LinearLayout
android:id="b"
</LinearLayout>
<LinearLayout
android:id="c"
</LinearLayout>
<LinearLayout
android:id="d"
</LinearLayout>
</FrameLayout>
</LinearLayout>
</TabHost>
我有这个:http: //imageshack.us/photo/my-images/23/6a3t.jpg/
我想要这个:http: //imageshack.us/photo/my-images/809/kesm.jpg/