Проблема с отображением макета при необходимости прокрутки - PullRequest
0 голосов
/ 02 мая 2011

Я хочу отобразить две кнопки внизу экрана своей активности, но каждый раз, когда я заполняю экран представлениями, заставляющими меня прокручиваться, две кнопки внизу моего экрана исчезают.когда нет необходимости прокручивать кнопки, все в порядке.

, пожалуйста, помогите спасибо.

Код макета? xml version = "1.0" encoding = "utf-8"?>

    <LinearLayout 
    android:id="@+id/lin_layout_list_view"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:isScrollContainer="true"
        android:paddingLeft="8dp"
        android:paddingRight="8dp">

        <ListView android:id="@+id/android:list"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
        />
    </LinearLayout>

    <RelativeLayout 
        android:layout_width="fill_parent" 
            android:layout_height="wrap_content"
            android:padding="2px"
            android:layout_gravity="bottom"
            >
            <TableLayout
                android:layout_below="@id/lin_layout_list_view"
                android:layout_alignParentBottom="true"
                android:gravity="bottom"
                android:layout_width ="fill_parent"
                android:layout_height="wrap_content"
                android:stretchColumns="0,1">

                <TableRow
                    android:orientation="horizontal">
                    <Button android:id="@+id/ws_button_back" 
                        android:layout_width="wrap_content" 
                        android:layout_height="wrap_content"
                            android:text=" Back "
                        />

                    <Button android:id="@+id/ws_button_ok" 
                        android:layout_width="wrap_content" 
                        android:layout_height="wrap_content"
                            android:text=" Ok "/>

                </TableRow>

            </TableLayout>        

        </RelativeLayout>
</LinearLayout>

1 Ответ

0 голосов
/ 03 мая 2011

Оберните кнопки вместе с прокручиваемым содержимым (например, -Listview) в виде прокрутки и затем отобразите содержимое.

...