summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/launcher2/ApplicationInfoDropTarget.java2
-rw-r--r--src/com/android/launcher2/AppsCustomizePagedView.java2
-rw-r--r--src/com/android/launcher2/CellLayout.java6
-rw-r--r--src/com/android/launcher2/DeleteZone.java16
-rw-r--r--src/com/android/launcher2/FocusHelper.java6
-rw-r--r--src/com/android/launcher2/IconCache.java2
-rw-r--r--src/com/android/launcher2/IconDropTarget.java2
-rw-r--r--src/com/android/launcher2/Launcher.java40
-rw-r--r--src/com/android/launcher2/LauncherApplication.java12
-rw-r--r--src/com/android/launcher2/PagedViewCellLayout.java6
-rw-r--r--src/com/android/launcher2/PagedViewExtendedLayout.java2
-rw-r--r--src/com/android/launcher2/PagedViewWidget.java4
-rw-r--r--src/com/android/launcher2/Utilities.java2
-rw-r--r--src/com/android/launcher2/Workspace.java16
14 files changed, 60 insertions, 58 deletions
diff --git a/src/com/android/launcher2/ApplicationInfoDropTarget.java b/src/com/android/launcher2/ApplicationInfoDropTarget.java
index ce359d44a..f42aaf535 100644
--- a/src/com/android/launcher2/ApplicationInfoDropTarget.java
+++ b/src/com/android/launcher2/ApplicationInfoDropTarget.java
@@ -50,7 +50,7 @@ public class ApplicationInfoDropTarget extends IconDropTarget {
int colour = getContext().getResources().getColor(R.color.app_info_filter);
mHoverPaint.setColorFilter(new PorterDuffColorFilter(colour, PorterDuff.Mode.SRC_ATOP));
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
// For the application info drop target, we just ignore the left padding since we don't want
// to overlap with the delete zone padding
int tb = getResources().getDimensionPixelSize(
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index 5173672da..14e051c64 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -319,7 +319,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
public void run() {
cl.calculateSpans(itemInfo);
if (cl.findCellForSpan(null, itemInfo.spanX, itemInfo.spanY)) {
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
animateItemOntoScreen(dragView, cl, itemInfo);
} else {
mLauncher.addExternalItemToScreen(itemInfo, cl);
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 52b59f10c..8efb6ce7c 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -167,7 +167,7 @@ public class CellLayout extends ViewGroup {
final Resources res = getResources();
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
mNormalBackground = res.getDrawable(R.drawable.homescreen_large_blue);
mActiveBackground = res.getDrawable(R.drawable.homescreen_large_green);
mActiveGlowBackground = res.getDrawable(R.drawable.homescreen_large_green_strong);
@@ -353,7 +353,7 @@ public class CellLayout extends ViewGroup {
}
void animateDrop() {
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
Resources res = getResources();
float onDropScale = res.getInteger(R.integer.config_screenOnDropScalePercent) / 100.0f;
ObjectAnimator scaleUp = ObjectAnimator.ofFloat(this, "hoverScale", onDropScale);
@@ -391,7 +391,7 @@ public class CellLayout extends ViewGroup {
// When we're small, we are either drawn normally or in the "accepts drops" state (during
// a drag). However, we also drag the mini hover background *over* one of those two
// backgrounds
- if (LauncherApplication.isScreenXLarge() && mBackgroundAlpha > 0.0f) {
+ if (LauncherApplication.isScreenLarge() && mBackgroundAlpha > 0.0f) {
Drawable bg;
boolean mini = getScaleX() < 0.5f;
diff --git a/src/com/android/launcher2/DeleteZone.java b/src/com/android/launcher2/DeleteZone.java
index 4b3592164..fdd41257f 100644
--- a/src/com/android/launcher2/DeleteZone.java
+++ b/src/com/android/launcher2/DeleteZone.java
@@ -68,7 +68,7 @@ public class DeleteZone extends IconDropTarget {
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 @@ public class DeleteZone extends IconDropTarget {
protected void onFinishInflate() {
super.onFinishInflate();
mTransition = (TransitionDrawable) getCompoundDrawables()[LEFT_DRAWABLE];
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
mTransition.setCrossFadeEnabled(false);
}
@@ -102,7 +102,7 @@ public class DeleteZone extends IconDropTarget {
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 @@ public class DeleteZone extends IconDropTarget {
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 @@ public class DeleteZone extends IconDropTarget {
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 @@ public class DeleteZone extends IconDropTarget {
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 @@ public class DeleteZone extends IconDropTarget {
}
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;
}
}
diff --git a/src/com/android/launcher2/FocusHelper.java b/src/com/android/launcher2/FocusHelper.java
index f14ebaeb9..861a70b2d 100644
--- a/src/com/android/launcher2/FocusHelper.java
+++ b/src/com/android/launcher2/FocusHelper.java
@@ -132,7 +132,7 @@ public class FocusHelper {
* To be deprecated.
*/
static boolean handlePagedViewWidgetKeyEvent(PagedViewWidget w, int keyCode, KeyEvent e) {
- if (!LauncherApplication.isScreenXLarge()) return false;
+ if (!LauncherApplication.isScreenLarge()) return false;
final PagedViewExtendedLayout parent = (PagedViewExtendedLayout) w.getParent();
final ViewGroup container = (ViewGroup) parent.getParent();
@@ -522,7 +522,7 @@ public class FocusHelper {
* Handles key events in the tab widget.
*/
static boolean handleTabKeyEvent(AccessibleTabView v, int keyCode, KeyEvent e) {
- if (!LauncherApplication.isScreenXLarge()) return false;
+ if (!LauncherApplication.isScreenLarge()) return false;
final FocusOnlyTabWidget parent = (FocusOnlyTabWidget) v.getParent();
final TabHost tabHost = findTabHostParent(parent);
@@ -577,7 +577,7 @@ public class FocusHelper {
* Handles key events in the workspace button bar.
*/
static boolean handleButtonBarButtonKeyEvent(View v, int keyCode, KeyEvent e) {
- if (!LauncherApplication.isScreenXLarge()) return false;
+ if (!LauncherApplication.isScreenLarge()) return false;
final ViewGroup parent = (ViewGroup) v.getParent();
final ViewGroup launcher = (ViewGroup) parent.getParent();
diff --git a/src/com/android/launcher2/IconCache.java b/src/com/android/launcher2/IconCache.java
index 0c26bf05c..7e37afe82 100644
--- a/src/com/android/launcher2/IconCache.java
+++ b/src/com/android/launcher2/IconCache.java
@@ -54,7 +54,7 @@ public class IconCache {
mContext = context;
mPackageManager = context.getPackageManager();
mBubble = new Utilities.BubbleText(context);
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
mIconDpi = DisplayMetrics.DENSITY_HIGH;
} else {
mIconDpi = context.getResources().getDisplayMetrics().densityDpi;
diff --git a/src/com/android/launcher2/IconDropTarget.java b/src/com/android/launcher2/IconDropTarget.java
index fb5d0f081..4d018e64f 100644
--- a/src/com/android/launcher2/IconDropTarget.java
+++ b/src/com/android/launcher2/IconDropTarget.java
@@ -126,7 +126,7 @@ public class IconDropTarget extends TextView implements DropTarget, DragControll
@Override
public void getHitRect(Rect outRect) {
super.getHitRect(outRect);
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
outRect.top -= mDragPadding[0];
outRect.right += mDragPadding[1];
outRect.bottom += mDragPadding[2];
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 9b136c45d..2fe1c7d5b 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -346,7 +346,7 @@ public final class Launcher extends Activity
registerReceiver(mCloseSystemDialogsReceiver, filter);
// If we have a saved version of these external icons, we load them up immediately
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
if (sGlobalSearchIcon == null || sVoiceSearchIcon == null || sAppMarketIcon == null) {
updateIconsAffectedByPackageManagerChanges();
}
@@ -895,7 +895,7 @@ public final class Launcher extends Activity
DragLayer dragLayer = (DragLayer) findViewById(R.id.drag_layer);
dragLayer.setDragController(dragController);
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
mAllAppsGrid = (AllAppsView) dragLayer.findViewById(R.id.all_apps_view);
mAllAppsGrid.setup(this, dragController);
// We don't want a hole punched in our window.
@@ -963,7 +963,7 @@ public final class Launcher extends Activity
final View divider = findViewById(R.id.all_apps_divider);
final View configureButton = findViewById(R.id.configure_button);
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
deleteZone.setOverlappingViews(new View[] { allAppsButton, divider, configureButton });
} else {
deleteZone.setOverlappingView(findViewById(R.id.all_apps_button_cluster));
@@ -1013,7 +1013,7 @@ public final class Launcher extends Activity
}
mButtonCluster = (ViewGroup) findViewById(R.id.all_apps_button_cluster);
View.OnKeyListener listener = null;
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
// For tablets, AllApps lives in the button bar at the top
listener = new ButtonBarKeyEventListener();
} else {
@@ -1695,7 +1695,7 @@ public final class Launcher extends Activity
}
private void addItems() {
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
// Animate the widget chooser up from the bottom of the screen
if (mState != State.CUSTOMIZE) {
showCustomizationDrawer(true);
@@ -2198,7 +2198,7 @@ public final class Launcher extends Activity
mWorkspace.setAllowLongPress(false);
mWorkspace.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,
HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
addItems();
} else {
startWallpaper();
@@ -2513,7 +2513,7 @@ public final class Launcher extends Activity
// AllAppsView.Watcher
public void zoomed(float zoom) {
// In XLarge view, we zoom down the workspace below all apps so it's still visible
- if (zoom == 1.0f && !LauncherApplication.isScreenXLarge()) {
+ if (zoom == 1.0f && !LauncherApplication.isScreenLarge()) {
mWorkspace.setVisibility(View.GONE);
}
}
@@ -2586,7 +2586,7 @@ public final class Launcher extends Activity
case WORKSPACE:
hideOrShowToolbarButton(true, mButtonCluster, showSeq);
mDeleteZone.setDragAndDropEnabled(true);
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
mDeleteZone.setText(getResources().getString(R.string.delete_zone_label_workspace));
}
break;
@@ -2594,7 +2594,7 @@ public final class Launcher extends Activity
case APPS_CUSTOMIZE:
hideOrShowToolbarButton(false, mButtonCluster, hideSeq);
mDeleteZone.setDragAndDropEnabled(false);
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
mDeleteZone.setText(getResources().getString(R.string.delete_zone_label_all_apps));
}
break;
@@ -2651,7 +2651,7 @@ public final class Launcher extends Activity
View tmpView;
if (toAllApps) {
- tmpView = (LauncherApplication.isScreenXLarge())
+ tmpView = (LauncherApplication.isScreenLarge())
? (View) mAllAppsGrid : mAppsCustomizeTabHost;
} else {
tmpView = mHomeCustomizationDrawer;
@@ -2664,7 +2664,7 @@ public final class Launcher extends Activity
if (!springLoaded) {
mWorkspace.shrink(ShrinkState.BOTTOM_HIDDEN, animated);
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
// Everytime we launch into AllApps, we reset the successful drop flag which
// controls when it should hide/show the mini workspaces
mAllAppsPagedView.resetSuccessfulDropFlag();
@@ -2781,14 +2781,14 @@ public final class Launcher extends Activity
View tmpView;
if (fromAllApps) {
- tmpView = (LauncherApplication.isScreenXLarge())
+ tmpView = (LauncherApplication.isScreenLarge())
? (View) mAllAppsGrid : mAppsCustomizeTabHost;
} else {
tmpView = mHomeCustomizationDrawer;
}
final View fromView = tmpView;
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
mCustomizePagedView.endChoiceMode();
mAllAppsPagedView.endChoiceMode();
}
@@ -2894,7 +2894,7 @@ public final class Launcher extends Activity
mWorkspace.enterSpringLoadedDragMode(layout);
if (mState == State.ALL_APPS || mState == State.APPS_CUSTOMIZE) {
mState = State.ALL_APPS_SPRING_LOADED;
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
cameraZoomIn(State.ALL_APPS, true, true);
} else {
cameraZoomIn(State.APPS_CUSTOMIZE, true, true);
@@ -2910,7 +2910,7 @@ public final class Launcher extends Activity
void exitSpringLoadedDragMode() {
if (mState == State.ALL_APPS_SPRING_LOADED) {
mWorkspace.exitSpringLoadedDragMode(Workspace.ShrinkState.BOTTOM_VISIBLE);
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
cameraZoomOut(State.ALL_APPS, true, true);
mState = State.ALL_APPS;
} else {
@@ -2928,7 +2928,7 @@ public final class Launcher extends Activity
void showAllApps(boolean animated) {
if (mState != State.WORKSPACE) return;
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
cameraZoomOut(State.ALL_APPS, animated, false);
((View) mAllAppsGrid).requestFocus();
@@ -2994,7 +2994,7 @@ public final class Launcher extends Activity
* - From another workspace
*/
void closeAllApps(boolean animated) {
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
if (mState == State.ALL_APPS || mState == State.ALL_APPS_SPRING_LOADED) {
mWorkspace.setVisibility(View.VISIBLE);
cameraZoomIn(State.ALL_APPS, animated, false);
@@ -3125,7 +3125,7 @@ public final class Launcher extends Activity
}
private void updateGlobalSearchIcon() {
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
final View searchButton = findViewById(R.id.search_button);
final View searchDivider = findViewById(R.id.search_divider);
@@ -3149,7 +3149,7 @@ public final class Launcher extends Activity
}
private void updateVoiceSearchIcon() {
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
final View searchDivider = findViewById(R.id.search_divider);
final View voiceButton = findViewById(R.id.voice_button);
@@ -3501,7 +3501,7 @@ public final class Launcher extends Activity
// Workaround a bug that occurs when rotating the device while the customization mode is
// open, we trigger a new layout on all the CellLayout children.
- if (LauncherApplication.isScreenXLarge() && (mState == State.CUSTOMIZE)) {
+ if (LauncherApplication.isScreenLarge() && (mState == State.CUSTOMIZE)) {
final int childCount = mWorkspace.getChildCount();
for (int i = 0; i < childCount; ++i) {
mWorkspace.getChildAt(i).requestLayout();
diff --git a/src/com/android/launcher2/LauncherApplication.java b/src/com/android/launcher2/LauncherApplication.java
index 041392c68..67573e083 100644
--- a/src/com/android/launcher2/LauncherApplication.java
+++ b/src/com/android/launcher2/LauncherApplication.java
@@ -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() {
diff --git a/src/com/android/launcher2/PagedViewCellLayout.java b/src/com/android/launcher2/PagedViewCellLayout.java
index 92459d8eb..54bdec40c 100644
--- a/src/com/android/launcher2/PagedViewCellLayout.java
+++ b/src/com/android/launcher2/PagedViewCellLayout.java
@@ -259,7 +259,7 @@ public class PagedViewCellLayout extends ViewGroup implements Page {
}
int getContentWidth() {
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
// Return the distance from the left edge of the content of the leftmost icon to
// the right edge of the content of the rightmost icon
@@ -283,7 +283,7 @@ public class PagedViewCellLayout extends ViewGroup implements Page {
int count = getChildCount();
for (int i = 0; i < count; i++) {
View child = getChildAt(i);
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
child.layout(0, 0, r - l, b - t);
} else {
child.layout(mPaddingLeft, mPaddingTop, getMeasuredWidth() - mPaddingRight,
@@ -477,7 +477,7 @@ public class PagedViewCellLayout extends ViewGroup implements Page {
height = myCellVSpan * cellHeight + ((myCellVSpan - 1) * heightGap) -
topMargin - bottomMargin;
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
x = hStartPadding + myCellX * (cellWidth + widthGap) + leftMargin;
y = vStartPadding + myCellY * (cellHeight + heightGap) + topMargin;
} else {
diff --git a/src/com/android/launcher2/PagedViewExtendedLayout.java b/src/com/android/launcher2/PagedViewExtendedLayout.java
index f471b76c7..94890d8ce 100644
--- a/src/com/android/launcher2/PagedViewExtendedLayout.java
+++ b/src/com/android/launcher2/PagedViewExtendedLayout.java
@@ -42,7 +42,7 @@ public class PagedViewExtendedLayout extends LinearLayout implements Page {
}
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
} else {
// PagedView currently has issues with different-sized pages since it calculates the
diff --git a/src/com/android/launcher2/PagedViewWidget.java b/src/com/android/launcher2/PagedViewWidget.java
index 6492888ce..2ffa398d1 100644
--- a/src/com/android/launcher2/PagedViewWidget.java
+++ b/src/com/android/launcher2/PagedViewWidget.java
@@ -257,7 +257,7 @@ public class PagedViewWidget extends LinearLayout implements Checkable {
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
return FocusHelper.handlePagedViewWidgetKeyEvent(this, keyCode, event)
|| super.onKeyDown(keyCode, event);
} else {
@@ -268,7 +268,7 @@ public class PagedViewWidget extends LinearLayout implements Checkable {
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
return FocusHelper.handlePagedViewWidgetKeyEvent(this, keyCode, event)
|| super.onKeyUp(keyCode, event);
} else {
diff --git a/src/com/android/launcher2/Utilities.java b/src/com/android/launcher2/Utilities.java
index cd98cab7f..ba258939c 100644
--- a/src/com/android/launcher2/Utilities.java
+++ b/src/com/android/launcher2/Utilities.java
@@ -243,7 +243,7 @@ final class Utilities {
final float density = metrics.density;
sIconWidth = sIconHeight = (int) resources.getDimension(R.dimen.app_icon_size);
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
sIconContentSize = (int) resources.getDimension(R.dimen.app_icon_content_size);
}
sIconTextureWidth = sIconTextureHeight = sIconWidth + 2;
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 192787e33..1373996aa 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -249,7 +249,7 @@ public class Workspace extends SmoothPagedView
super(context, attrs, defStyle);
mContentIsRefreshable = false;
- if (!LauncherApplication.isScreenXLarge()) {
+ if (!LauncherApplication.isScreenLarge()) {
mFadeInAdjacentScreens = false;
}
@@ -333,7 +333,7 @@ public class Workspace extends SmoothPagedView
@Override
protected int getScrollMode() {
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
return SmoothPagedView.X_LARGE_MODE;
} else {
return SmoothPagedView.DEFAULT_MODE;
@@ -1063,7 +1063,7 @@ public class Workspace extends SmoothPagedView
// If the screen is not xlarge, then don't rotate the CellLayouts
// NOTE: If we don't update the side pages alpha, then we should not hide the side pages.
// see unshrink().
- if (!LauncherApplication.isScreenXLarge()) return;
+ if (!LauncherApplication.isScreenLarge()) return;
final int halfScreenSize = getMeasuredWidth() / 2;
@@ -1292,7 +1292,7 @@ public class Workspace extends SmoothPagedView
public boolean onTouchEvent(MotionEvent ev) {
if (mLauncher.isAllAppsVisible() && mShrinkState == ShrinkState.BOTTOM_HIDDEN) {
PagedView appsPane;
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
appsPane = (PagedView) mLauncher.findViewById(R.id.all_apps_paged_view);
} else {
appsPane = (PagedView) mLauncher.findViewById(R.id.apps_customize_pane_content);
@@ -1864,7 +1864,7 @@ public class Workspace extends SmoothPagedView
final CellLayout cl = (CellLayout)getChildAt(i);
float finalAlphaValue = 0f;
float rotation = 0f;
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
finalAlphaValue = (i == mCurrentPage) ? 1.0f : 0.0f;
if (i < mCurrentPage) {
@@ -1886,7 +1886,7 @@ public class Workspace extends SmoothPagedView
// If the screen is not xlarge, then don't rotate the CellLayouts
// NOTE: If we don't update the side pages alpha, then we should not hide the side
// pages. see unshrink().
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
translation = getOffsetXForRotation(rotation, cl.getWidth(), cl.getHeight());
}
@@ -2407,7 +2407,7 @@ public class Workspace extends SmoothPagedView
if (source != this) {
final int[] touchXY = new int[] { (int) mDragViewVisualCenter[0],
(int) mDragViewVisualCenter[1] };
- if (LauncherApplication.isScreenXLarge() && (mIsSmall || mIsInUnshrinkAnimation)
+ if (LauncherApplication.isScreenLarge() && (mIsSmall || mIsInUnshrinkAnimation)
&& !mLauncher.isAllAppsVisible()) {
// When the workspace is shrunk and the drop comes from customize, don't actually
// add the item to the screen -- customize will do this itself
@@ -2921,7 +2921,7 @@ public class Workspace extends SmoothPagedView
// Workaround the fact that we don't actually want spring-loaded mode in phone
// UI yet.
- if (LauncherApplication.isScreenXLarge()) {
+ if (LauncherApplication.isScreenLarge()) {
// In spring-loaded mode, we still want the user to be able to hover over a
// full screen (which is traditionally set to not accept drops) if they want
// to get to pages beyond the screen that is full.