Я программирование для Android 2.2 (API уровня 8) и в моем основном Виде я, в упрощенном виде, это:Положите ViewStub ниже ListView
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/relativeParent"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TableRow
android:id="@+id/tableRow2"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
...
</TableRow>
<ListView
android:id="@+id/listview"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</ListView>
<ViewStub
android:id="@+id/includeIdForPlayerStub"
android:layout_alignParentBottom="true"
android:layout_alignBottom="@+id/listview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inflatedId="@+id/playerStubId"
android:layout="@layout/player_stub" />
</RelativeLayout>
Я хочу поставить ViewStub в нижней части родителя, прямо под списком, но так как сейчас он не работает. LinearLayout, добавленный ViewStub, находится в нижней части экрана, но список идет ниже добавленного контента, в результате чего содержимое списка будет ниже и не видно/доступно. Это также очевидно, глядя на расположение полосы прокрутки ниже добавленного контента.
rootview из ViewStub является:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="bottom"
android:layout_gravity="center_horizontal|bottom"
android:background="@drawable/backrepeat"
android:baselineAligned="false" >
</LinearLayout>
Каждый знает, как решить эту проблему? Спасибо!
я решил мою проблему переключения от ViewStub к включаемый с видимостью нет, и изменить его при необходимости. – 2013-03-20 22:11:21