I don't know if it helps but I managed to have a uniform background inside the box strokes for the TextInputLayout in outline box mode.

In my example, the box corners have a 10dp radius (text_input_layout_box_radius
). Also, the TextInputEditText has height of 80dp (text_input_edit_text_height
).
I defined a style for the TextInputLayout in which I apply a custom background shape:
<style name="MyTextInputLayout" parent="Widget.Design.TextInputLayout">
<item name="android:background">@drawable/text_input_background</item>
<!-- ... other customizations ... -->
</style>
The text_input_background.xml
drawable is defined as a layer-list:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:height="@dimen/text_input_edit_text_height"
android:top="@dimen/text_input_background_padding_top">
<shape>
<corners android:radius="@dimen/text_input_layout_box_radius" />
<solid android:color="@color/<your_background_color>" />
</shape>
</item>
</layer-list>
The text_input_background_padding_top
is equal to 13dp and it does the magic here. In my case, it centers the shape inside the box. It is needed to compensate for the hint height which is 30sp in my case, it can be modified with the hintTextAppearance
attribute. You will probably have to find the correct padding value corresponding to your hint text height.
Let me know if it helps!