簡體   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