diff --git a/res/drawable-ldrtl/container_fastscroll_popup_bg.xml b/res/drawable-ldrtl/container_fastscroll_popup_bg.xml index 2bbf5cd72a..dd57ca45e7 100644 --- a/res/drawable-ldrtl/container_fastscroll_popup_bg.xml +++ b/res/drawable-ldrtl/container_fastscroll_popup_bg.xml @@ -16,7 +16,7 @@ --> - + diff --git a/res/drawable/all_apps_search_divider.xml b/res/drawable/all_apps_search_divider.xml index 99905e4233..fe99cff17d 100644 --- a/res/drawable/all_apps_search_divider.xml +++ b/res/drawable/all_apps_search_divider.xml @@ -15,6 +15,6 @@ --> - + \ No newline at end of file diff --git a/res/drawable/all_apps_search_hint.xml b/res/drawable/all_apps_search_hint.xml index b2ff7a428e..b7a7b15698 100644 --- a/res/drawable/all_apps_search_hint.xml +++ b/res/drawable/all_apps_search_hint.xml @@ -16,5 +16,5 @@ --> - + \ No newline at end of file diff --git a/res/drawable/container_fastscroll_popup_bg.xml b/res/drawable/container_fastscroll_popup_bg.xml index 3dc76800b0..364a8273b4 100644 --- a/res/drawable/container_fastscroll_popup_bg.xml +++ b/res/drawable/container_fastscroll_popup_bg.xml @@ -16,7 +16,7 @@ --> - + diff --git a/res/drawable/ic_allapps_search.xml b/res/drawable/ic_allapps_search.xml index 2aeb9479bd..15bcac48dd 100644 --- a/res/drawable/ic_allapps_search.xml +++ b/res/drawable/ic_allapps_search.xml @@ -19,6 +19,6 @@ android:viewportHeight="24.0" android:viewportWidth="24.0"> diff --git a/res/layout/all_apps_search_market.xml b/res/layout/all_apps_search_market.xml index 3f19b2515f..ba110f34a1 100644 --- a/res/layout/all_apps_search_market.xml +++ b/res/layout/all_apps_search_market.xml @@ -23,7 +23,7 @@ android:paddingRight="@dimen/container_fastscroll_thumb_max_width" android:fontFamily="sans-serif-medium" android:textSize="14sp" - android:textColor="?android:attr/colorAccent" + android:textColor="@color/accentColor" android:text="@string/all_apps_search_market_message" android:textAllCaps="true" android:focusable="true" diff --git a/res/values/colors.xml b/res/values/colors.xml index 6f3a74c245..19b78af49c 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -54,4 +54,5 @@ #fff2f2f2 #ffffffff + #ff4286f4 diff --git a/res/values/styles.xml b/res/values/styles.xml index cd06b7560d..396c9d9be2 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -40,10 +40,12 @@ diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java index f4b4520c3e..b1d2126e48 100644 --- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java +++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java @@ -7,6 +7,7 @@ import android.animation.ArgbEvaluator; import android.animation.ObjectAnimator; import android.graphics.Color; +import android.graphics.Rect; import android.support.v4.content.ContextCompat; import android.support.v4.graphics.ColorUtils; import android.support.v4.view.animation.FastOutSlowInInterpolator; @@ -17,11 +18,13 @@ import android.view.animation.DecelerateInterpolator; import android.view.animation.Interpolator; -import com.android.launcher3.DeviceProfile; +import com.android.launcher3.CellLayout; import com.android.launcher3.Hotseat; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherAnimUtils; +import com.android.launcher3.LauncherAppWidgetHostView; import com.android.launcher3.R; +import com.android.launcher3.ShortcutAndWidgetContainer; import com.android.launcher3.Utilities; import com.android.launcher3.Workspace; import com.android.launcher3.userevent.nano.LauncherLogProto; @@ -116,6 +119,8 @@ public boolean onInterceptTouchEvent(MotionEvent ev) { } else if (mLauncher.isAllAppsVisible() && !mAppsView.shouldContainerScroll(ev)) { mNoIntercept = true; + } else if (!mLauncher.isAllAppsVisible() && !shouldPossiblyIntercept(ev)) { + mNoIntercept = true; } else { // Now figure out which direction scroll events the controller will start // calling the callbacks. @@ -153,22 +158,27 @@ public boolean onInterceptTouchEvent(MotionEvent ev) { } private boolean shouldPossiblyIntercept(MotionEvent ev) { - DeviceProfile grid = mLauncher.getDeviceProfile(); if (mDetector.isIdleState()) { - if (grid.isVerticalBarLayout()) { - if (ev.getY() > mLauncher.getDeviceProfile().heightPx - mBezelSwipeUpHeight) { - return true; - } - } else { - if (mLauncher.getDragLayer().isEventOverHotseat(ev) || - mLauncher.getDragLayer().isEventOverPageIndicator(ev)) { - return true; + CellLayout cl = mLauncher.getWorkspace().getCurrentDropLayout(); + if (cl != null) { + ShortcutAndWidgetContainer c = cl.getShortcutsAndWidgets(); + int x = (int)ev.getX(); + int y = (int)ev.getY(); + Rect outRect = new Rect(); + int count = c.getChildCount(); + for (int i = 0; i < count; i++) { + View v = c.getChildAt(i); + if (v instanceof LauncherAppWidgetHostView) { + v.getGlobalVisibleRect(outRect); + if (outRect.contains(x, y)) { + return false; + } + } } } - return false; - } else { - return true; } + + return true; } @Override