Is it possible to get string resources from a repository (like HashTable, List etc. ) not strings.xml?
Desired usage in layouts like
<EditText android:id="@+id/inputSearch"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@StringRepository.GetMessage("Search")"
android:inputType="textVisiblePassword"/>
My challenge is maintain string values on application server (web) and refresh all string resources (both layout and java side) without version updating.
I tried to traverse all Views on onCreate method of Activity instance, but couldn’t find a solution for dynamically created Views.
Any help to achieve this challenge would be appreciated.
No. The
@resourcesyntax only works with XML defined resources. If you want to define your strings in a hashmap, you will need to set the hint/text of your views in code.