Support the RTL mode of the message view.

Actions:
1) Force the menu view layer set layout direction as LTR to simplify the translation positioning and animations. Besides, the floating menu would also recover the last position when users turn it on.
2) Set the layout direction of the message view as LOCALE.

Bug: 244622119
Test: manual test
Change-Id: I5199305b1df39f88bd31307a58fd08390ec8120e
This commit is contained in:
Peter Liang
2022-12-20 15:24:40 +08:00
parent ee4078d6fa
commit 2fda02b3b4
2 changed files with 4 additions and 0 deletions

View File

@@ -61,6 +61,7 @@ class MenuMessageView extends LinearLayout implements
MenuMessageView(Context context) {
super(context);
setLayoutDirection(LAYOUT_DIRECTION_LOCALE);
setVisibility(GONE);
mTextView = new TextView(context);

View File

@@ -150,6 +150,9 @@ class MenuViewLayer extends FrameLayout implements
AccessibilityManager accessibilityManager, IAccessibilityFloatingMenu floatingMenu) {
super(context);
// Simplifies the translation positioning and animations
setLayoutDirection(LAYOUT_DIRECTION_LTR);
mWindowManager = windowManager;
mAccessibilityManager = accessibilityManager;
mFloatingMenu = floatingMenu;