B3nedikt / reword

Reword is a android library to update the texts of views when the apps texts have changed due to a language change or an update of the apps string resources.
Apache License 2.0
32 stars 7 forks source link

textview not reword #27

Closed ZhouBey closed 2 years ago

ZhouBey commented 2 years ago

i can not reword text when i create a instance of TextView in Activity,alse i called setText(getString(...))

B3nedikt commented 2 years ago

@ZhouBey Yes, manually created views cannot get updated using this library, basically you need to updated their text manually using setText(...) whenever you change the Resources in any way. Support for manually created views out of the box is not something I have planned to support, it would be a pretty big change. Feel free to work on it though, I take PRs :)

ZhouBey commented 2 years ago

yeah, null of attrsTag by manually creating views,so is there any way to achieve it? or do you have any ideas?thank you.

B3nedikt commented 2 years ago

I think there are two approaches:

Both approaches will take considerate effort. I think you will be faster by just doing it manually, but if you want to contribute I would accept a PR for both approaches. I think the second one is preferably though. While less generic, it would be more transparent for the user of the lib how to use the feature.

ZhouBey commented 2 years ago

I understand, thank you