繁体   English   中英

将图像的中心对准屏幕底部

[英]Align the center of an image to the bottom of the screen

我想知道什么是将图像的垂直中心与android屏幕底部对齐的最简单方法。 似乎应该没有那么难,但是我似乎找不到任何答案。

您可以使用FrameLayout并将ImageView放置在其底部中心。

<FrameLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center_horizontal">

    <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/imageView"
            android:layout_gravity="center_horizontal|bottom" />
</FrameLayout>

暂无
暂无

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

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