0
我在做這個應用的時候,動態地改變一個ListView大小像下面的代碼:更改ListView的位置動態
RelativeLayout.LayoutParams mParam = new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT);
sucs.setLayoutParams(myListView);
但是當我這樣做,ListView控件出現在視圖的頂部。有什麼方法可以將它放在它應該是的textview下面嗎?
在此先感謝!
編輯: Here's我的xml:
<TextView
android:id="@+id/sucursales_empresa"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/direccion_empresa"
android:background="@drawable/barra"
android:text="@string/sucursales"
android:visibility="gone" />
<ListView
android:id="@+id/sucursalesEmpresaList"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/sucursales_empresa"
android:cacheColorHint="#00000000"
android:visibility="gone" />
可以你的郵箱你的XML? – AkashG 2012-07-13 05:08:09
發佈您的代碼。 – 2012-07-13 05:10:44
你還需要我發佈什麼? – CarlosT 2012-07-13 05:13:04