Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TextInputLayout hint doesn't get refreshed upon recreate() method call

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.

like image 950
Feroz Khan Avatar asked Jun 21 '26 17:06

Feroz Khan


1 Answers

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

like image 164
MatPag Avatar answered Jun 23 '26 07:06

MatPag



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!