Moving tablet interface to 'large' devices

(later, we will decide this more accurately based on the width of the screen in dips, but for now keeping changes so that they can easily be backported to earlier versions of Android)

Change-Id: I203addcbf19e8e3813c488af47e4fdf90dcd3115
This commit is contained in:
Michael Jurka
2011-05-12 14:57:05 -07:00
parent 70a10240a9
commit a2eb17095d
147 changed files with 60 additions and 58 deletions

View File

@@ -27,7 +27,7 @@ import android.os.Handler;
public class LauncherApplication extends Application {
public LauncherModel mModel;
public IconCache mIconCache;
private static boolean sIsScreenXLarge;
private static boolean sIsScreenLarge;
private static float sScreenDensity;
private static final boolean ENABLE_ROTATION = false;
@@ -36,7 +36,9 @@ public class LauncherApplication extends Application {
super.onCreate();
// set sIsScreenXLarge and sScreenDensity *before* creating icon cache
sIsScreenXLarge = (getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE;
final int screenSize = getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK;
sIsScreenLarge = screenSize == Configuration.SCREENLAYOUT_SIZE_LARGE ||
screenSize == Configuration.SCREENLAYOUT_SIZE_XLARGE;
sScreenDensity = getResources().getDisplayMetrics().density;
mIconCache = new IconCache(this);
@@ -97,11 +99,11 @@ public class LauncherApplication extends Application {
}
public static boolean isInPlaceRotationEnabled() {
return sIsScreenXLarge && ENABLE_ROTATION;
return sIsScreenLarge && ENABLE_ROTATION;
}
public static boolean isScreenXLarge() {
return sIsScreenXLarge;
public static boolean isScreenLarge() {
return sIsScreenLarge;
}
public static float getScreenDensity() {