Custom editText on android -


i'm newbie android layout, need help.

i want create custom edittext, this:

an email field blue "bar" in left side

i'm want fix best possible way.

someone?

thanks.

if want blue line on left, can set background on edittext, such as,

    <edittext         android:layout_width="0dp"         android:layout_height="wrap_content"         android:layout_marginleft="10dp"         android:background="@drawable/custom_edittext"         android:layout_weight="1" /> 

then create file in drawable folder called custom_layer.xml

   <?xml version="1.0" encoding="utf-8"?>    <layer-list xmlns:android="http://schemas.android.com/apk/res/android" >     <item         android:bottom="-5dp"         android:right="-5dp"         android:top="-5dp">         <shape android:shape="rectangle" >             <solid android:color="@color/color_of_the_background" />             <stroke                 android:width="5dp"                 android:color="@color/color_of_the_border" />         </shape>     </item> </layer-list> 

and final selector file - custom_edittext.xm.

<selector     xmlns:android="http://schemas.android.com/apk/res/android">     <item android:drawable="@drawable/custom_layer">             </item> </selector> 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

jdbc - Not able to establish database connection in eclipse -