Last active
April 1, 2021 09:18
-
-
Save vklachkov/9e3b04e5e2cb8c45a2309dc796382e46 to your computer and use it in GitHub Desktop.
Colorize TextInputLayout.FilledBox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- See: --> | |
<!-- https://medium.com/omisoft/textinputlayout-styling-8b36a5e0d73c --> | |
<!-- Style and color must be placed into different files --> | |
<!-- Style --> | |
<style name="TextInputLayoutStyle" parent="Widget.MaterialComponents.TextInputLayout.FilledBox"> | |
<item name="hintTextColor">@color/input_box_color</item> | |
<item name="passwordToggleTint">@color/input_box_color</item> | |
<item name="boxStrokeColor">@color/input_box_color</item> | |
<item name="boxBackgroundColor">#292D3D</item> | |
<item name="shapeAppearanceOverlay">@style/TextInputLayoutStyle.ShapeOverlay</item> | |
</style> | |
<!-- And color --> | |
<?xml version="1.0" encoding="utf-8"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:color="@color/light_blue" android:state_focused="true"/> | |
<item android:color="@color/dark_gray" android:state_enabled="false"/> | |
<item android:color="@color/gray"/> <!-- unfocused --> | |
</selector> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment