Search code examples
androidandroid-textinputlayout

TextInputLayout border gets chopped when it gets refocused and has text


I have started to introduce material design on an existing project. I have a TextInputLayout, however, when it gets refocused and it has text, the border gets chopped. See image

enter image description here

Any ideas what attribute should be changed on either TextInputLayout or Edittext? Thanks


Solution

  • Currently your cursor ballon (bottom) color is white due to which it looks like border cutout so you can either change the color or remove the ballon.

    Below attribute can be modified:

    <style name="ThemeOverlay.AppTheme.TextInputEditText.Outlined" parent="">
        <item name="colorControlActivated">@color/...</item>
    

    Regarding the primaryColor attribute, you can change the primaryColor of your app here:

    <style name="AppTheme" parent="Theme.MaterialComponents.DayNight">
        <item name="colorPrimary">@color/colorPrimary</item>