Based on Fedor Kazakov and others answers, I created a default config.
styles.xml
@color/colorPrimary
@color/colorPrimaryDark
@color/colorAccent
@style/AppTheme.TextFloatLabelAppearance
@style/AppTheme.TextErrorAppearance
@style/TextAppearance.Design.Counter
@style/TextAppearance.Design.Counter.Overflow
@color/colorAccent
20sp
#ff0000
20sp
activity_layout.xml
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Text hint here"
android:text="5,2" />
Focused:
Without focus:
Error message: