0

I am trying to incorporate two builds(say build a and build b) within a single android project. For this , I have created a global constant boolean variable (say flag). Based on theflag value , I want the resources to be loaded for that respective build.

Is it possible to create two different layout_a and layout_b folders instead of default layout folder so that in activities I could simply call upon resources from required folders. or

Should be I create different files homepage_a.xml and homepage_b.xml ?

E.g

 in my activity class , I want to use this 
 if(flag)
    setContentView(R.layout_a.homepage);
 else
     setContentView(R.layout_b.homepage);

 instead of

 if(flag)
    setContentView(R.layout.homepage_a);
 else
   setContentView(R.layout.homepage_b);

Thank you.

4

0 回答 0