首頁 要聞 中國 經(jīng)濟 財經(jīng) 品牌 點評 會展 綜合 | 設(shè)為首頁
中國品牌要聞網(wǎng)-傳遞資訊的價值打造品牌的影響
您現(xiàn)在的位置:首頁/智能制造/ 正文
layout_margintop該屬性控件距上部最近控件的最小值
來源:
編輯:
時間:2022-07-23

     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>

免責(zé)聲明:本文僅代表作者個人觀點,與本網(wǎng)無關(guān)。其原創(chuàng)性以及文中陳述文字和內(nèi)容未經(jīng)本站證實, 對本文以及其中全部或者部分內(nèi)容、文字的真實性、完整性、及時性本站不作任何保證或承諾, 請讀者僅作參考,并請自行核實相關(guān)內(nèi)容。當(dāng)事人(單位)如有異議,請參閱《刪帖說明》辦理。
中國品牌要聞網(wǎng)-傳遞資訊的價值打造品牌的影響
  • CopyRight@ 2005-2022 中國品牌要聞網(wǎng)
  • 工商注冊號 430122000189097
  • ICP備案許證:渝ICP備2022012785號