diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardWidgetPager.java b/packages/Keyguard/src/com/android/keyguard/KeyguardWidgetPager.java index 0d92e1178da89..010e2a35d0528 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardWidgetPager.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardWidgetPager.java @@ -594,13 +594,12 @@ public class KeyguardWidgetPager extends PagedView implements PagedView.PageSwit animateOutlinesAndSidePages(false); } - public void showInitialPageHints() { - mShowingInitialHints = true; + void updateChildrenContentAlpha(float sidePageAlpha) { int count = getChildCount(); for (int i = 0; i < count; i++) { KeyguardWidgetFrame child = getWidgetPageAt(i); if (i != mCurrentPage) { - child.setBackgroundAlpha(KeyguardWidgetFrame.OUTLINE_ALPHA_MULTIPLIER); + child.setBackgroundAlpha(sidePageAlpha); child.setContentAlpha(0f); } else { child.setBackgroundAlpha(0f); @@ -609,9 +608,15 @@ public class KeyguardWidgetPager extends PagedView implements PagedView.PageSwit } } + public void showInitialPageHints() { + mShowingInitialHints = true; + updateChildrenContentAlpha(KeyguardWidgetFrame.OUTLINE_ALPHA_MULTIPLIER); + } + @Override void setCurrentPage(int currentPage) { super.setCurrentPage(currentPage); + updateChildrenContentAlpha(0.0f); updateWidgetFramesImportantForAccessibility(); } diff --git a/packages/Keyguard/src/com/android/keyguard/PagedView.java b/packages/Keyguard/src/com/android/keyguard/PagedView.java index 5c2413a0db4a9..a3f5c24a1af5c 100644 --- a/packages/Keyguard/src/com/android/keyguard/PagedView.java +++ b/packages/Keyguard/src/com/android/keyguard/PagedView.java @@ -754,6 +754,8 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc @Override public void onChildViewRemoved(View parent, View child) { mForceScreenScrolled = true; + invalidate(); + invalidateCachedOffsets(); } protected void invalidateCachedOffsets() {