簡體   English   中英

如何在屏幕底部將android Textview元素居中

[英]how to center android Textview element at bottom of the screen

我有使用DroidDraw的android xml布局:鏈接: https ://docs.google.com/document/d/1L3QJVwI9Znmeu1yANJXhDcZGFR70587d4oznu0hrZCw/edit?usp = sharing0

在此處輸入圖片說明

我需要底部對齊最后一個Textview(如打印屏幕所示為黃色)。

我需要這個 :

在此處輸入圖片說明

嘗試使用

android:alignParentBottom="true"

如果我正確地看到TextView的父ViewGroup是RelativeLayout

將父相對布局屬性設置為:

android:layout_gravity = "bottom | left" 

在相對布局中使用:

    android:alignParentBottom="true" 

在線性布局中使用:

    android:layout_weight="1.0"
    android:gravity="bottom|right"

這篇文章的竅門。

stackOverflow鏈接

我需要在布局上實現layout_weight。 基本上定義頁眉,內容和頁腳的權重

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM