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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -