【问题标题】:Fix view at the bottom of the screen in an Activity in android在android中的Activity中修复屏幕底部的视图
【发布时间】:2010-07-23 09:36:04
【问题描述】:

我想修复屏幕底部的视图。我该怎么做?

【问题讨论】:

    标签: android android-layout


    【解决方案1】:

    您可以创建一个覆盖整个屏幕的相对布局并使用 layout_alignParentBottom="true"

    <RelativeLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent">
    
         <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"/>
    
    </RelativeLayout>
    

    现在文本视图应该始终位于屏幕底部。

    【讨论】:

      猜你喜欢
      • 2012-09-12
      • 2023-03-12
      • 1970-01-01
      • 1970-01-01
      • 2019-05-02
      • 1970-01-01
      • 1970-01-01
      • 2017-06-10
      • 1970-01-01
      相关资源
      最近更新 更多