質問

I have a multilanguage application that uses the standard xml files to provide string values in different laguages.

...
res/values/strings.xml
res/values-es/strings.xml
res/values-pt/strings.xml
...

What I want to do is override the normal behavior of Android to look for a resource somewhere else before looking into the standard xml files.

So when the code calls getResources().getString() a custom code would look into an alternative resource file before falling back into the standard getString implementation.

Is there any way to achieve this?

thanks!

役に立ちましたか?

解決

Is there any way to achieve this?

No. For your own invocations of getString(), you can wrap those calls in your own code to check "somewhere else".

他のヒント

The part you intend to achieve is not possible as Android by default would look only i the res folder for the required resources.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top