我正在做这个应用程序,我在下面的代码中动态更改 ListView 大小:
RelativeLayout.LayoutParams mParam = new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT);
sucs.setLayoutParams(myListView);
但是当我这样做时,ListView 会出现在视图的顶部。有什么方法可以将它放在应该在的文本视图下方?
提前致谢!
编辑: 这是我的 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" />