android linearlayout 边框阴影,AndroidLinearLayout:添加阴影边界LinearLayout - Android LinearLayout : Add border...

这篇博客讨论了如何在Android的LinearLayout上添加不规则的边框和阴影效果。用户提出问题,想要创建类似示例中的边框,目前只能创建简单的全包围边框。其他网友给出了建议,包括使用XML drawable文件来定义形状、颜色和阴影,并将其设为LinearLayout的背景,使用stroke属性添加边框,或者使用9-patch图像实现更自然的阴影效果。解决方案包括使用9-patch图形、自定义XML背景和使用CardView组件来达到所需效果。
摘要由CSDN通过智能技术生成

主题:

我想创建相同的linearlayout这个边界为例:在这个例子中,我们可以看到,在linearlayout边境是不一样的。我如何使用xml可拉的创建这个文件?现在,我只能够创建一个简单的linearlayout边境周围是这样的:

原文:

I would like to create the same border of this linearlayout as example :

94e68a076ccbe5a21d156d415fb0b83e.png

In this example, we can see that the border is not the same all around the linearLayout. How can i create this using an xml drawable file ?

For now, i have only able to create a simple border all around the linearlayout like this :

android:radius="1dp"

android:topRightRadius="0dp"

android:bottomRightRadius="0dp"

android:bottomLeftRadius="0dp" />

android:width="1dp"

android:color="#E3E3E1" />

网友:您可以使用财产……创建一个XML文件与矩形等形状,颜色和阴影效果和设置它作为你的线性布局的背景。

(原文:you can use background property for that...create one XML file with shape like rectangle, color and shadow effect for it and set it as background for

your linear layout..)

网友:使用中风的灰色边框和填充效果

(原文:use stroke for gray border and padding effect too)

网友:我认为,它的两个布局xml,一个是线性布局和内部是相对布局有填充

(原文:I think,that its two layout xml,say one is linear layout and inner is relative layout having padding)

楼主:@Prag创建这个xml文件的你能帮我吗?

(原文:@Prag's Coul

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值