android中Tab設計中:tab中的listview最下面一部分被tab遮蓋的解決

  1. 和佈局文件有關:以下設置便可java

<?xml version="1.0" encoding="utf-8"?>
<TabHost 
    android:id="@android:id/tabhost" 
    android:layout_width="fill_parent"
	android:layout_height="fill_parent" 
	xmlns:android="http://schemas.android.com/apk/res/android"
	 >
	<RelativeLayout
		android:orientation="vertical"
		android:layout_width="fill_parent"
		android:layout_height="fill_parent">
		<FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
           	android:layout_above="@android:id/tabs"/>
		<TabWidget 
		    android:id="@android:id/tabs"
			android:layout_width="fill_parent" 
			android:layout_height="wrap_content"
			android:layout_alignParentBottom="true"
			android:background="@drawable/title_bar"/>	    
	</RelativeLayout>
</TabHost>
相關文章
相關標籤/搜索