I'm using TextInputLayout. I set it's hint from string.xml to apply localization. So after changing the language from the drop down I use recreate() method which refreshes the whole activity components with selected language resources but TextInputLayout hint doesn't get a refresh.
Update July 2022
Starting from material version 1.7.0 the bug should be fixed.
This is known bug of material library TextInputLayout already reported here.
PS: A possible workaround is to manually call textInputLayout.setHint(R.string.your_string) again on onRestoreInstanceState to update the text. (call it after super.onRestoreInstanceState(bundle))
or call it in onViewStateRestored
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With