我想創建一個佈局,其中頂部,底部另一個將在那裏,並在這兩個欄之間的一個列表視圖,但問題是這裏是,頂部和底部欄之間,我需要顯示項目列表,其中頂部和底部欄將在那裏,只有listview將滾動。需要顯示頂部和底部欄之間的項目列表,
下面是我的xml佈局,對於冗長的問題抱歉,任何建議將不勝感激。由於
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
style="@android:style/ButtonBar"
>
<ImageButton
android:id="@+id/IBADDNEW"
android:layout_width="62dp"
android:layout_height="62dp"
android:src="@drawable/ad_user_l" />
<EditText
android:id="@+id/ETSEARCHTEXT"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" >
<requestFocus />
</EditText>
<ImageButton
android:id="@+id/IBSEARCH"
android:layout_width="62dp"
android:layout_height="62dp"
android:src="@drawable/search_64" />
</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true"
>
<LinearLayout
android:id="@+id/LLforList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity ="center_vertical"
android:orientation="horizontal" >
<ImageView
android:id="@+id/IVimageIcon"
android:layout_width="60dp"
android:layout_height="60dp"
android:src="@drawable/ic_farmer" />
<TextView
android:id="@+id/TVFLNAME"
android:layout_width="match_parent"
android:layout_height="80dp"
android:text="Some Name"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
</ScrollView>
<RelativeLayout
android:id="@+id/relativeLayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/blankbarbottom"
android:layout_alignParentBottom="true" >
<LinearLayout
android:id="@+id/FLlayoutLIst"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="horizontal" >
<ImageView
android:id="@+id/btnMainMenu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:src="@drawable/mainmenu_on" />
<ImageView
android:id="@+id/btnSettings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:src="@drawable/settings_off" />
<ImageButton
android:id="@+id/btnExit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:src="@drawable/exit_off" />
</LinearLayout>
</RelativeLayout>
你有沒有看過這個問題。 – AAnkit 2011-12-31 06:29:06
我做到了。你應該考慮一下我的答案......你應該學會使用正確的UI元素。 – mseo 2011-12-31 06:33:47
所以我如何設置一個固定的酒吧,與簡單的列表視圖,我需要顯示不同的行與不同的圖像..我怎麼會實現它 – AAnkit 2011-12-31 06:53:58