Loading quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java +4 −2 Original line number Diff line number Diff line Loading @@ -199,8 +199,10 @@ public class BubbleBarView extends FrameLayout { @Override public void onRtlPropertiesChanged(int layoutDirection) { // TODO(b/273310265): set this based on bubble bar position and not LTR or RTL mBubbleBarBackground.setAnchorLeft(layoutDirection == LAYOUT_DIRECTION_RTL); // TODO(b/313661121): set this based on bubble bar position and not LTR or RTL boolean onLeft = layoutDirection == LAYOUT_DIRECTION_RTL; mBubbleBarBackground.setAnchorLeft(onLeft); mRelativePivotX = onLeft ? 0f : 1f; } private boolean isOnLeft() { Loading quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleStashedHandleViewController.java +24 −10 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.launcher3.taskbar.bubbles; import static android.view.View.INVISIBLE; import static android.view.View.LAYOUT_DIRECTION_RTL; import static android.view.View.VISIBLE; import android.animation.Animator; Loading Loading @@ -124,22 +125,35 @@ public class BubbleStashedHandleViewController { private void updateBounds() { // As more bubbles get added, the icon bounds become larger. To ensure a consistent // handle bar position, we pin it to the edge of the screen. final int stashedCenterY = mStashedHandleView.getHeight() - mStashedTaskbarHeight / 2; if (isOnLeft()) { final int left = mBarViewController.getHorizontalMargin(); mStashedHandleBounds.set( left, stashedCenterY - mStashedHandleHeight / 2, left + mStashedHandleWidth, stashedCenterY + mStashedHandleHeight / 2); mStashedHandleView.setPivotX(0); } else { final int right = mActivity.getDeviceProfile().widthPx - mBarViewController.getHorizontalMargin(); final int stashedCenterY = mStashedHandleView.getHeight() - mStashedTaskbarHeight / 2; mStashedHandleBounds.set( right - mStashedHandleWidth, stashedCenterY - mStashedHandleHeight / 2, right, stashedCenterY + mStashedHandleHeight / 2); mStashedHandleView.updateSampledRegion(mStashedHandleBounds); mStashedHandleView.setPivotX(mStashedHandleView.getWidth()); } mStashedHandleView.updateSampledRegion(mStashedHandleBounds); mStashedHandleView.setPivotY(mStashedHandleView.getHeight() - mStashedTaskbarHeight / 2f); } private boolean isOnLeft() { // TODO(b/313661121): set this based on bubble bar position and not LTR or RTL return mStashedHandleView.getLayoutDirection() == LAYOUT_DIRECTION_RTL; } public void onDestroy() { mRegionSamplingHelper.stopAndDestroy(); mRegionSamplingHelper = null; Loading Loading
quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java +4 −2 Original line number Diff line number Diff line Loading @@ -199,8 +199,10 @@ public class BubbleBarView extends FrameLayout { @Override public void onRtlPropertiesChanged(int layoutDirection) { // TODO(b/273310265): set this based on bubble bar position and not LTR or RTL mBubbleBarBackground.setAnchorLeft(layoutDirection == LAYOUT_DIRECTION_RTL); // TODO(b/313661121): set this based on bubble bar position and not LTR or RTL boolean onLeft = layoutDirection == LAYOUT_DIRECTION_RTL; mBubbleBarBackground.setAnchorLeft(onLeft); mRelativePivotX = onLeft ? 0f : 1f; } private boolean isOnLeft() { Loading
quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleStashedHandleViewController.java +24 −10 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.launcher3.taskbar.bubbles; import static android.view.View.INVISIBLE; import static android.view.View.LAYOUT_DIRECTION_RTL; import static android.view.View.VISIBLE; import android.animation.Animator; Loading Loading @@ -124,22 +125,35 @@ public class BubbleStashedHandleViewController { private void updateBounds() { // As more bubbles get added, the icon bounds become larger. To ensure a consistent // handle bar position, we pin it to the edge of the screen. final int stashedCenterY = mStashedHandleView.getHeight() - mStashedTaskbarHeight / 2; if (isOnLeft()) { final int left = mBarViewController.getHorizontalMargin(); mStashedHandleBounds.set( left, stashedCenterY - mStashedHandleHeight / 2, left + mStashedHandleWidth, stashedCenterY + mStashedHandleHeight / 2); mStashedHandleView.setPivotX(0); } else { final int right = mActivity.getDeviceProfile().widthPx - mBarViewController.getHorizontalMargin(); final int stashedCenterY = mStashedHandleView.getHeight() - mStashedTaskbarHeight / 2; mStashedHandleBounds.set( right - mStashedHandleWidth, stashedCenterY - mStashedHandleHeight / 2, right, stashedCenterY + mStashedHandleHeight / 2); mStashedHandleView.updateSampledRegion(mStashedHandleBounds); mStashedHandleView.setPivotX(mStashedHandleView.getWidth()); } mStashedHandleView.updateSampledRegion(mStashedHandleBounds); mStashedHandleView.setPivotY(mStashedHandleView.getHeight() - mStashedTaskbarHeight / 2f); } private boolean isOnLeft() { // TODO(b/313661121): set this based on bubble bar position and not LTR or RTL return mStashedHandleView.getLayoutDirection() == LAYOUT_DIRECTION_RTL; } public void onDestroy() { mRegionSamplingHelper.stopAndDestroy(); mRegionSamplingHelper = null; Loading