Android子控件超出父控件方法

在父控件 添加 android:clipChildren=“false”
通过子控件 android:layout_marginTop="-15dp" 方式来超父控件 若是没有超出继续在包含这个父控件的父控件里添加android:clipChildren=“false” 知道超出为止

<RelativeLayout

                android:layout_width="@dimen/x200"
                android:layout_height="@dimen/y88"
                android:layout_marginLeft="@dimen/y80"
                android:clipChildren="false">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_alignParentBottom="true"
                    android:layout_centerInParent="true"
                    android:background="@drawable/jianbian2"
                    android:gravity="center"
                    android:src="@mipmap/strong_img_position"
                    android:text="1250"
                    android:textColor="@color/white"
                    android:textSize="@dimen/x54" />

                <ImageView
                    android:layout_width="@dimen/y80"
                    android:layout_height="@dimen/y80"
                    android:layout_alignParentRight="true"
                    android:layout_marginRight="-20dp"
                    android:layout_marginTop="-15dp"
                    android:src="@mipmap/ic_launcher" />

            </RelativeLayout>

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值