android怎么把控件放在屏幕最下面
答案:4 悬赏:70
解决时间 2021-01-17 16:21
- 提问者网友:绫月
- 2021-01-17 13:02
android怎么把控件放在屏幕最下面
最佳答案
- 二级知识专家网友:duile
- 2021-01-17 13:27
Android控件放屏幕最下面有两种方式:
使用android:layout_height="match_parent"将控件设置为占满屏幕。
使用RelativeLayout包括控件,控件中增加android:layout_alignParentBottom="true" 表示放在父控件的最下方。
使用android:layout_gravity="bottom" 指定当前控件的位置为bottom即可。
使用android:layout_height="match_parent"将控件设置为占满屏幕。
使用RelativeLayout包括控件,控件中增加android:layout_alignParentBottom="true" 表示放在父控件的最下方。
使用android:layout_gravity="bottom" 指定当前控件的位置为bottom即可。
全部回答
- 1楼网友:孤老序
- 2021-01-17 15:58
参见SDK实例代码中关于布局的示范。Samples/ApiDemos中
- 2楼网友:十年萤火照君眠
- 2021-01-17 15:25
android:layout_height="fill_parent"
android:gravity="bottom"
android:orientation="vertical">
android:layout_height="wrap_content"
android:textSize="16sp"
android:textColor="?attr/list_text" />
试试这个布局
其中LinearLayout的参数必须是android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="bottom"
- 3楼网友:底特律间谍
- 2021-01-17 14:13
你可以用RelativeLayout, 然后在你的控件里属性加上alignParentBottom="true"
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯