I decided to write this answer based on the comments of the previous one.
First you need to create a style for your counter, for example:
<style name="CounterStyle" parent="TextAppearance.AppCompat.Small"> <item name="android:textColor">@android:color/white</item> </style>
Then add this style to TextInputLayout:
app:counterTextAppearance="@style/CounterStyle"
To make it all work. Full code:
<android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" app:counterEnabled="true" app:counterTextAppearance="@style/CounterStyle" android:textColor="@color/white" android:textColorHint="@color/white"> <EditText android:id="@+id/myfield" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/white" android:hint="@string/myfield_hint" android:inputType="text" android:maxLength="26" android:textColor="@color/white" android:textColorHint="@color/white"/> </android.support.design.widget.TextInputLayout>
You can also use some style for overflow counter:
app:counterOverflowTextAppearance="@style/YourOverflowTextStyleHere"
As described here (thanks @Sufian for the link)
source share