本文介绍了设计的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的圆角和放大器;内心的阴影
发布评论