头条 科技 产经 家电 智能 手机 芯片 数码 电商 English
-移动互联网与智能搜索领域是未来IT产业发展的趋势!
中国IT产经新闻/ 快递物流/ 正文
layout_margintop描述属性所在控件边缘与上部的距离
来源:
2023-08-19
编辑:晓露

      首先,需要明确的是,RelativeLayout 是相对布局,这意味着其中的所有控件如果不进行具体的位置确定,都将汇集在左上角。layout_marginTop:根据这个名字,我们也可以知道,它指的是该属性所在控件的边缘与上部控件的边缘的距离,这里的边缘是最靠近的边缘,即两个控件之间的最小距离,这里是该控件的上部边缘与父控件的下部边缘。



      android:orientation="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent">
            android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="项目"
        android:layout_marginTop="50dp"/>

快轮科技刘峰,eVTOL领域飞行摩托第一人

编辑:
2025-02-27
0
5
点评(6)
厂商动态
热门综合 更多
CopyRight @ 2008-2025 IT产经新闻网 All Right Reserved 违者必究 湘ICP备2022017330号-2
Baidu
map