设计的EditText的圆角和放大器;内心的阴影

编程入门 行业动态 更新时间:2024-10-09 20:25:35
本文介绍了设计的EditText的圆角和放大器;内心的阴影的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想创建一个自定义的EditText同时具有圆角和内侧阴影。

I'm trying to create a custom EditText that has both rounded corners and an inner shadow.

我在创建内阴影图层列表,

I made a layer list that creates the inner shadow,

<layer-list xmlns:android="schemas.android/apk/res/android"> <item > <shape android:shape="rectangle"> <solid android:color="#6C6C6C" /> </shape> </item> <item> <shape android:shape="rectangle"> <solid android:color="@color/ashes" /> </shape> </item> <!-- White Top color --> <item android:top="3px" android:left="3px"> <shape android:shape="rectangle"> <solid android:color="#FFFFFF" /> </shape> </item> </layer-list>

输出看起来是这样的,

The output looks like this,

如何还添加了圆润的造型?

How can I also add a rounded shape?

推荐答案

添加角标记中的形状标签:

<corners android:radius="5dp" />

更多推荐

设计的EditText的圆角和放大器;内心的阴影

本文发布于:2023-06-02 19:17:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/457425.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:放大器   阴影   圆角   内心   EditText

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!