Outer glow in edittext

柔情痞子 提交于 2019-12-10 12:17:27

问题


I'm trying to make outer grow in edit text view for better look for user experience.

I tried some of the method to get this result. On of the example is:
<EditText
        android:id="@+id/editText1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="20dip"
        android:ems="10"
        android:gravity="top"
        android:inputType="textMultiLine"
        android:shadowColor="#003399"
        android:shadowDx="0"
        android:shadowDy="0" 
        android:shadowRadius="3">

But it didn't give the result. Is their any other effective way or i just have to give up?


回答1:


I have done this with 9 path drawing tool. Link




回答2:


try this

create a new xml file named borderr.xml in drawable folder and put this in it

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:padding="10dp"
    android:shape="rectangle" >

    <solid android:color="#1E90FF" />


    <stroke android:width="2dip" android:color="#1E90FF" />
</shape>

and on button set

 android:background="@drawable/borderr"


来源:https://stackoverflow.com/questions/25136405/outer-glow-in-edittext

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!