首页 资讯 IT 互联网 手机 智造 家电 电商 科普 游戏 关于我们 网站地图
首页/消费电子

1

layout_margintop该属性控件距上部最近控件的最小值
2021-06-04

 layout_marginTop,layout_marginBottom,layout_marginRight,layout_marginLeft是 RelativeLayout 中的四种属性。


layout_marginTop 指定该属性所在控件距上部最近控件的最小值;
layout_marginBottom 指定该属性所在控件距下部最近控件的最小值;
layout_marginLeft 指定该属性所在控件距左边最近控件的最小值;
layout_marginRight 指定该属性所在控件距右边最近控件的最小值。
layout_marginTop使用方法:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="
      android:orientation="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent">
    <Button android:id="@+id/project"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="项目"
        android:layout_marginTop="50dp"/>
</RelativeLayout>

声明:该文系信息发布,IT手机世界仅提供信息存储空间服务。
点赞
来源:
新品快讯更多
厂商动态更多
会展中心更多
热搜排行更多

CopyRight@2015-2023 IT手机世界 All Right Reserved

工信备案号:京备A2-2009413

IT手机世界畅享移动互联时代智能智慧新生活