Jo Jo Roid Jo Jo Roid - 1 year ago 78
Android Question

Which one layout is adding - Android?

I created two resource

) .

How can I find in my code(programmatically) that which one
is adding ?

Answer Source

As you created two resource folder, one solution is to create these folder for values too. Then for values folder add this:

    <bool name="isLarge">false</bool>

and in your values-large folder:

    <bool name="isLarge">true</bool>

Then in your activity:

boolean isLarge = getResources().getBoolean(R.bool.isLarge);
if (isLarge) {
    // do something
} else {
    // do something else
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download