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
diff --git a/src/com/android/launcher2/DeleteZone.java b/src/com/android/launcher2/DeleteZone.java
index 4b35921..fdd4125 100644
--- a/src/com/android/launcher2/DeleteZone.java
+++ b/src/com/android/launcher2/DeleteZone.java
@@ -68,7 +68,7 @@
mOrientation = a.getInt(R.styleable.DeleteZone_direction, ORIENTATION_HORIZONTAL);
a.recycle();
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
int tb = getResources().getDimensionPixelSize(
R.dimen.delete_zone_vertical_drag_padding);
int lr = getResources().getDimensionPixelSize(
@@ -81,7 +81,7 @@
protected void onFinishInflate() {
super.onFinishInflate();
mTransition = (TransitionDrawable) getCompoundDrawables()[LEFT_DRAWABLE];
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
mTransition.setCrossFadeEnabled(false);
}
@@ -102,7 +102,7 @@
final ItemInfo item = (ItemInfo) dragInfo;
// On x-large screens, you can uninstall an app by dragging from all apps
- if (item instanceof ApplicationInfo && LauncherApplication.isScreenXLarge()) {
+ if (item instanceof ApplicationInfo && LauncherApplication.isScreenLarge()) {
mLauncher.startApplicationUninstallActivity((ApplicationInfo) item);
}
@@ -166,7 +166,7 @@
getHitRect(mRegion);
mRegionF.set(mRegion);
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
// This region will be a "dead zone" for scrolling; make it extend to the edge of
// the screen so users don't accidentally trigger a scroll while deleting items
mRegionF.top = mLauncher.getWorkspace().getTop();
@@ -223,7 +223,7 @@
mInAnimation = new AnimatorSet();
mInAnimation.setInterpolator(new AccelerateInterpolator());
mInAnimation.setDuration(duration);
- if (!LauncherApplication.isScreenXLarge()) {
+ if (!LauncherApplication.isScreenLarge()) {
Animator translateAnim;
if (mOrientation == ORIENTATION_HORIZONTAL) {
translateAnim = ObjectAnimator.ofFloat(this, "translationY",
@@ -243,7 +243,7 @@
mOutAnimation = new AnimatorSet();
mOutAnimation.setInterpolator(new AccelerateInterpolator());
mOutAnimation.setDuration(duration);
- if (!LauncherApplication.isScreenXLarge()) {
+ if (!LauncherApplication.isScreenLarge()) {
Animator translateAnim;
if (mOrientation == ORIENTATION_HORIZONTAL) {
translateAnim = ObjectAnimator.ofFloat(this, "translationY", 0f,
@@ -269,12 +269,12 @@
}
private int getTransitionAnimationDuration() {
- return LauncherApplication.isScreenXLarge() ?
+ return LauncherApplication.isScreenLarge() ?
XLARGE_TRANSITION_DURATION : TRANSITION_DURATION;
}
private int getAnimationDuration() {
- return LauncherApplication.isScreenXLarge() ?
+ return LauncherApplication.isScreenLarge() ?
XLARGE_ANIMATION_DURATION : ANIMATION_DURATION;
}
}