android:clipChildren属性,子布局超出父布局

是否允许子View超出父View的范围,Boolean型true 、false ,默认true不允许;

android:clipChildren="true":如下

android:clipChildren="false":如下

代码:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:clipChildren="false"
    android:layout_height="match_parent">


    <RelativeLayout
        android:id="@+id/rl"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:clipChildren="false"
        android:background="#ffffff">

        <RadioGroup
            android:id="@+id/rg"
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:background="#ffffff"
            android:clipChildren="false"
            android:gravity="bottom"
            android:orientation="horizontal">

            <RadioButton
                android:id="@+id/rb_home"
                style="@style/main_tab_button"
                android:drawableTop="@drawable/rgbtn_home_select"
                android:text="主页"/>

            <RadioButton
                android:id="@+id/rb_shoppingcart"
                style="@style/main_tab_button"
                android:drawableTop="@drawable/rgbtn_gouwuche_select"
                android:text="购物车"/>
            <ImageView
                android:id="@+id/iv"
                android:layout_width="0dp"
                android:layout_weight="1"
                android:src="@mipmap/ic_launcher_round"
                android:layout_height="68dp" />

            <RadioButton
                android:id="@+id/rb_orderfrom"
                style="@style/main_tab_button"
                android:drawableTop="@drawable/rgbtn_orderfrom_select"
                android:text="分类"/>

            <RadioButton
                android:id="@+id/rb_my"
                style="@style/main_tab_button"
                android:drawableTop="@drawable/rgbtn_my_select"
                android:text="个人"/>
        </RadioGroup>
        <View
            style="@style/Line_e0e0e0_Horizontal"/>
    </RelativeLayout>
    <FrameLayout
        android:id="@+id/fl"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_above="@id/rl"
        ></FrameLayout>
</RelativeLayout>

————————————————
版权声明:本文为CSDN博主「Choi晨」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_35605213/article/details/79715067

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值