0

I noticed that the two EditTexts I drew have different line thickness (the Password EditTexts line is thicker). Is there a property I can set so that they have the same thickness?

Thanks

edittext

Zoe
  • 27,060
  • 21
  • 118
  • 148
Espresso
  • 740
  • 13
  • 32
  • You might want to check this link : https://stackoverflow.com/questions/31758958/change-thickness-of-the-bottom-line-of-edittext-when-wrapped-into-textinputlayou – Gabriel Costin Jan 17 '19 at 17:43

1 Answers1

1

You can handle it with a custom drawable Add this drawable as a background of your edit text and you can can control it's width by changing width of stroke

 <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
    <item
        android:bottom="1dp"
        android:left="-2dp"
        android:right="-2dp"
        android:top="-2dp">
        <shape android:shape="rectangle" >
            <stroke
                android:width="10dp" />

            <solid android:color="#00FFFFFF" />

            <padding
                android:bottom="5dp"
                android:left="5dp"
                android:right="5dp"
                android:top="5dp" />
        </shape>
    </item>
</layer-list>
Khaled Qasem
  • 879
  • 7
  • 20