社区
Android
帖子详情
android:layout_marginBottom使用方法
ghostgoodbye
2012-03-19 04:43:33
我想让一个button永远在界面的最下方,不随着上方内容的缩短而移动,请问这个应该怎么用,查了很多,这个都起不了作用
没分了 不好意思,
...全文
264
1
打赏
收藏
android:layout_marginBottom使用方法
我想让一个button永远在界面的最下方,不随着上方内容的缩短而移动,请问这个应该怎么用,查了很多,这个都起不了作用 没分了 不好意思,
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
1 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
a107494639
2012-03-19
打赏
举报
回复
使用相对布局
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<Button
android:id="@+id/edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:text="edit" />
</RelativeLayout>
Android
开发 在 Relative
Layout
中
android
:
layout
_
margin
Bott
om
设置的不起作用
1、当设置为
android
:
layout
_height="wrap_content"时,最下面的控件
layout
_
margin
Bott
om
属性无效,如果其他控件
使用
layout
_above让自己处于最下面的控件之上,那么
layout
_
margin
Bott
om
属性有效; 2、当设置为...
android
:
layout
_
margin
bott
om
,
layout
_
margin
Bott
om
不能用的解决
方法
最近在写一个布局的时候,突然发现我的
layout
_
margin
Bott
om
不可以用代码如下:
android
:
layout
_width="fill_parent"
android
:
layout
_height="wrap_content" >
android
:id="@+id/task_list_black"
android
:
layout
_...
android
:
layout
_
margin
bott
om
,解决relative
layout
下
android
:
margin
bott
om
无效
android
:id=”@+id/relative
Layout
1″
android
:
layout
_width=”match_parent”
android
:
layout
_height=”wrap_content”
android
:
layout
_alignLeft=”@+id/textView1″
android
:
layout
_alignParentRight=”true”
android
...
android
:
layout
_
margin
bott
om
,有时Coordinator
Layout
会切断
margin
Bott
om
activity_album_detail.xml H2&...xmlns:app="http://schemas.
android
.c
om
/apk/res-auto"
android
:id="@+id/main_content"
android
:
layout
_width="match_parent"
android
:
layout
_height="match_parent">
android
:id=...
android
:
layout
_
margin
Left等的简单用法
靠右显示:用
android
:
layout
_
margin
Left,意思是距离左边框的距离; 靠左显示:用
android
:
layout
_
margin
Right,意思是距离右边框...
android
:
layout
_
margin
Bott
om
: 距离下边框 下面,是靠右显示的例子:
Android
80,471
社区成员
91,383
社区内容
发帖
与我相关
我的任务
Android
移动平台 Android
复制链接
扫一扫
分享
社区描述
移动平台 Android
android
android-studio
androidx
技术论坛(原bbs)
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章