This is what I am using now to have a my single APK support tablets
and smartphones on-the-fly.   I use if from my start activity, which
decides which activity to use (my app differences are more than just
layout).


   public boolean isTablet()
    {
        if (Build.VERSION.SDK_INT >=
Build.VERSION_CODES.HONEYCOMB_MR2)
        {
            return
(getResources().getConfiguration().smallestScreenWidthDp >= 600);
        }

        return (getResources().getConfiguration().screenLayout &
Configuration.SCREENLAYOUT_SIZE_MASK) >=
Configuration.SCREENLAYOUT_SIZE_XLARGE;
    }



This seems to work very well for me.

-- 
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

Reply via email to