2011-02-09 7 views
0

아래에 텍스트와 이미지를 표시하는 사용자 정의 대화 상자가 있습니다.Android - 사용자 정의 대화 상자 레이아웃 문제

텍스트는 몇 줄로 구성되어 있으며 모든 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 설정 내에서 설정됩니다.

+0

xml 레이아웃을 추가하면 쉽게 도움이됩니다. –

+0

여기에 xml 레이아웃을 표시하십시오. – Javanator

답변

0

RelativeLayout 안에 TextView와 ImageView를 래핑하면 TextView 아래에 표시되도록 ImageView를 설정할 수 있습니다.

<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"/> 

편집 : 나는 당신이 android1 설정 한 것을보고 : layout_alignParentBottom, 그것은 android1와 오타이며, 안드로이드하지 = "true"로? android : layout_alignParentBottom = "true"일까요?

+0

텍스트 창에 코드를 복사 할 때 하단의 해당 줄에 트릭을 추가하고 예에서 "1"은 오타가되었습니다. – Jamie

+0

당신은 환영합니다 :) –

관련 문제