-3

When I'm in an activity, how can I get die complete code of the R.java class to parse it? I want to parse for a resource String.

In my R class there's the following entry:

public static int abs__home=0x7f04000a;

And I want to search the whole text of R.java for the String "abs__home". I really need to search for the string.

4

1 回答 1

2

使用 getIdentifier()

int id = getResources().getIdentifier("abs__home", "string", getPackageName());

如果name( abs__home) 没有在资源内部退出,您将得到0

于 2013-07-04T12:30:30.550 回答