Android - проблема расположения пользовательских диалоговых окон - PullRequest
0 голосов
/ 09 февраля 2011

У меня есть настраиваемое диалоговое окно, отображающее текст и изображение внизу.

Текст состоит из нескольких строк, и, несмотря на то, что миллионы раз возятся со всем XML-макетом, изображение внизу всегда перекрывает половину / часть текста. Как я могу настроить его так, чтобы он появлялся снизу и после того, как текст закончился?

<ImageView android:id="@+id/image"
           android:layout_width="wrap_content" 
           android:layout_height="wrap_content"
       android:layout_centerHorizontal="true" 
          />

<ScrollView android:id="@+id/ScrollView01"
        android:layout_width="wrap_content" 
                android:layout_below="@+id/image"
        android:layout_height="200px">          

    <TextView  android:id="@+id/text"
           android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:textColor="#FFF"
             />

</ScrollView>     

<ImageView android:id="@+id/image2"
           android:layout_height="wrap_content"
           android:layout_width="wrap_content" 
           android:layout_centerHorizontal="true"
           android1:layout_alignParentBottom="true"/>

Элементы задаются внутри параметра RelativeLayout.

1 Ответ

0 голосов
/ 09 февраля 2011

Если вы поместите ваши TextView и ImageView в RelativeLayout, вы можете настроить ImageView для отображения ниже TextView.

<ImageView android:id="@+id/image2"
   android:layout_height="wrap_content"
   android:layout_width="wrap_content" 
   android:layout_centerHorizontal="true"
   android:layout_alignParentBottom="true"
   android:layout_below="@+id/ScrollView01"/>

EDIT: Я видел, что вы установили android1: layout_alignParentBottom = "true", это опечатка с android1, а не android? Разве это не должен быть android: layout_alignParentBottom = "true"?

...