How to remove highlighted EditText?

I spent the last hour trying to figure out how to get rid of this add-on in a simple EditText: enter image description here

All I want to do is align the input with the rest of the content, as the beautiful design guide says.

Layout couldn't be simpler:

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.actinarium.tiomantas.SetupChallengeFragment"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="16dp" android:orientation="vertical"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/new_challenge_name"/> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/new_challenge_name_hint1" android:singleLine="false"/> </LinearLayout> </ScrollView> 

I tried setting padding on EditText to 0dp - the text moved, but the line remained as it is. Oddly enough, I could not find ANY information on this issue, as if no one had noticed.

+7
android android-layout android-edittext
source share
3 answers

I think the line is the background image for EditText, so changing the indentation will not affect this. If you want, you can create a custom background that does not have capital letters.

Another hack you can do is add a negative field to an EditText:

  <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="-4dp" android:hint="@string/new_challenge_name_hint1" android:singleLine="false"/> 
+9
source share

Try giving "4dp" indentation for the textView. So that it matches the add editText.

+2
source share
 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.actinarium.tiomantas.SetupChallengeFragment"> <LinearLayout android:layout_width="match_parent" android:orientation="vertical" android:layout_height="wrap_content"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="16dp" android:orientation="vertical"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="jhjkhkhkjkljlkjkljlkj"/> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="hjhjhjkhjkhjkhkjhoiuyiyirehyiohj" android:singleLine="false"/> </LinearLayout> </LinearLayout> </ScrollView> 
-one
source share

All Articles