Merge changes I282ed7eb,I4e9ca9ed into tm-dev am: 772f09fe07 am: 2c8a9755ef
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18563479 Change-Id: I5d29552e2976c15d05e5b1a384990e7cb0644485 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -108,8 +108,16 @@ class ManageEducationView constructor(context: Context, positioner: BubblePositi
|
||||
alpha = 0f
|
||||
visibility = View.VISIBLE
|
||||
expandedView.getManageButtonBoundsOnScreen(realManageButtonRect)
|
||||
manageView.setPadding(realManageButtonRect.left - expandedView.manageButtonMargin,
|
||||
manageView.paddingTop, manageView.paddingRight, manageView.paddingBottom)
|
||||
val isRTL = mContext.resources.configuration.layoutDirection == LAYOUT_DIRECTION_RTL
|
||||
if (isRTL) {
|
||||
val rightPadding = positioner.screenRect.right - realManageButtonRect.right -
|
||||
expandedView.manageButtonMargin
|
||||
manageView.setPadding(manageView.paddingLeft, manageView.paddingTop,
|
||||
rightPadding, manageView.paddingBottom)
|
||||
} else {
|
||||
manageView.setPadding(realManageButtonRect.left - expandedView.manageButtonMargin,
|
||||
manageView.paddingTop, manageView.paddingRight, manageView.paddingBottom)
|
||||
}
|
||||
post {
|
||||
manageButton
|
||||
.setOnClickListener {
|
||||
@@ -122,7 +130,11 @@ class ManageEducationView constructor(context: Context, positioner: BubblePositi
|
||||
val offsetViewBounds = Rect()
|
||||
manageButton.getDrawingRect(offsetViewBounds)
|
||||
manageView.offsetDescendantRectToMyCoords(manageButton, offsetViewBounds)
|
||||
translationX = 0f
|
||||
if (isRTL && (positioner.isLargeScreen || positioner.isLandscape)) {
|
||||
translationX = (positioner.screenRect.right - width).toFloat()
|
||||
} else {
|
||||
translationX = 0f
|
||||
}
|
||||
translationY = (realManageButtonRect.top - offsetViewBounds.top).toFloat()
|
||||
bringToFront()
|
||||
animate()
|
||||
|
||||
@@ -146,6 +146,12 @@ class StackEducationView constructor(
|
||||
} else {
|
||||
setPadding(paddingLeft, paddingTop, positioner.bubbleSize + stackPadding,
|
||||
paddingBottom)
|
||||
if (positioner.isLargeScreen || positioner.isLandscape) {
|
||||
translationX = (positioner.screenRect.right - width - stackPadding)
|
||||
.toFloat()
|
||||
} else {
|
||||
translationX = 0f
|
||||
}
|
||||
}
|
||||
translationY = stackPosition.y + positioner.bubbleSize / 2 - getHeight() / 2
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user