Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲

登入介面的版權組件設置

編輯:關於 Android 開發

登入介面的版權組件設置

在登入頁底部加入版權文字,可提升產品的完整度。實作時可在 activity_login.xml 中加入 TextView,設定文字內容、字級、顏色與水平置中,並透過 layout_marginBottom 控制與底部的距離。

若要讓版權文字貼齊父容器底部,可使用 layout_alignParentBottom。不過此屬性通常只在 RelativeLayout 等支援相對定位的容器中有效,使用前需確認父容器類型。

運行:

小結:android:layout_alignParentBottom 屬性必須在父容器是相對布局才能設置。

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © Android教程網 All Rights Reserved