码迷,mamicode.com
首页 > 移动开发 > 详细

关于Android的margin(当前视图与周围视图的距离)和padding(当前视图与内部内容的距离)

时间:2017-08-13 20:49:45      阅读:236      评论:0      收藏:0      [点我收藏+]

标签:out   oid   and   ima   match   roi   images   androi   code   

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="300dp"
    android:background="#00aaff"
    android:orientation="vertical"
    android:padding="5dp">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="20dp"
        android:background="#ffff99"
        android:padding="60dp">

        <view
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#ff0000">
        </view>

    </LinearLayout>
</LinearLayout>

技术分享

关于Android的margin(当前视图与周围视图的距离)和padding(当前视图与内部内容的距离)

标签:out   oid   and   ima   match   roi   images   androi   code   

原文地址:http://www.cnblogs.com/qqhfeng/p/7354630.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!