繁体   English   中英

Android-自定义对话框布局问题

[英]Android - Custom dialog boxes layout problem

我有一个自定义对话框,在下面显示一些文本和图像。

文本由几行组成,尽管数百万次遍历了所有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设置内设置。

如果将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"/>

编辑:我看到你已经设置了android1:layout_alignParentBottom =“ true”,这是android1而不是android的错字吗? 不应该是android:layout_alignParentBottom =“ true”吗?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM