
android怎么把控件放在屏幕最下面
4个回答
推荐于2017-10-02 · 知道合伙人软件行家
关注

展开全部
Android控件放屏幕最下面有两种方式:
使用android:layout_height="match_parent"将控件设置为占满屏幕。
使用RelativeLayout包括控件,控件中增加android:layout_alignParentBottom="true" 表示放在父控件的最下方。
使用android:layout_gravity="bottom" 指定当前控件的位置为bottom即可。

2023-05-10 广告
您好!建议咨 深圳市微测检测有限公司,已建立起十余个专业实验室,企业通过微测检测就可以获得一站式的测试与认 证解决方案;(EMC、RF、MFi、BQB、QI、USB、安全、锂电池、快充、汽车电子EMC、汽车手机互 联、语音通话质量),认证遇...
点击进入详情页
本回答由微测检测5.10提供
展开全部
你可以用RelativeLayout, 然后在你的控件里属性加上alignParentBottom="true"
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
参见SDK实例代码中关于布局的示范。Samples/ApiDemos中
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="bottom"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:textColor="?attr/list_text" />
</LinearLayout>
试试这个布局
其中LinearLayout的参数必须是android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="bottom"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="bottom"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:textColor="?attr/list_text" />
</LinearLayout>
试试这个布局
其中LinearLayout的参数必须是android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="bottom"
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询