You're making your life way too hard. Treking is right. Define two string
names.
On Feb 19, 2014 12:32 PM, "sushant sharma" <[email protected]> wrote:

> I have an android project A which imports another android project B. B is
> a library project and has some strings.
>
> I intentionally keep a different string with the same name in the
> resources of project A.
>
> So, in short, I have 2 different strings (one in A, one in B) withe same
> name.
>
> The problem is that when I build the projects, it merges the R.java files.
> And doing something like this:
>      String s1 = this.getResources().getString(com.B.R.string.IDS_1018);
>     String s2 = this.getResources().getString(R.string.IDS_1018);
> gives wrong results.
>
> In both the queries above, I get the same string (the one i defined in the
> project A).
>
>
> Is this a bug? Is there a way I can achieve what I desire? I want to get
> different strings.
>
>
> --
> Sushant
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to