I have been experimenting with unifying the thickness of Entry's bottom line to have the same thickness while focused and unfocused.
I have been looking at this question: https://stackoverflow.com/questions/34588520/edittext-background-as-straight-line
And I have tried what the OP tried, and I got exactly what they got. A line in the middle of the entry.
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line"> <stroke android:color="#FA58AC" android:width="1dp"/> </shape>
And at the custom renderer inheriting from
MaterialEntryRenderer, I added this code to set the drawable as the background.
Then I tried the accepted solution, but it does not work at all. It makes a grey background to the whole entry, I could not get it to work.
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item android:left="-2dp" android:right="-2dp" android:top="-2dp"> <shape> <solid android:color="@android:color/white" /> <stroke android:width="1dp" android:color="@android:color/holo_green_light" /> </shape> </item>
Does anyone how to get this working?
Also, I want to make the placeholder sit at the same position the text sits on, is this possible? The placeholder is positioned a bit above the text position (when unfocused).
I could not find a proper object that seem to control the placeholder in
Control properties of
MaterialEntryRenderer of Android.
Thanks for your help.