diff options
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/ManageEducationView.kt | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/ManageEducationView.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/ManageEducationView.kt index 2ecf388ee514..e95e8e5cdaea 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/ManageEducationView.kt +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/ManageEducationView.kt @@ -109,8 +109,15 @@ class ManageEducationView constructor(context: Context, positioner: BubblePositi visibility = View.VISIBLE expandedView.getManageButtonBoundsOnScreen(realManageButtonRect) val isRTL = mContext.resources.configuration.layoutDirection == LAYOUT_DIRECTION_RTL - manageView.setPadding(realManageButtonRect.left - expandedView.manageButtonMargin, - manageView.paddingTop, manageView.paddingRight, manageView.paddingBottom) + 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 { |