Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32a440c7 authored by kaiyiz's avatar kaiyiz Committed by wangjing
Browse files

Dialer: The menu item not change to RTL mode

The view that invoked the options menu, it's layout direction is "ltr".

So we change the view's layout direction to "rtl" in RTL mode.

Change-Id: I1586fd283312d3d1b997167d8d8d8486f1660f32
CRs-Fixed: 816280
parent 9ba72e69
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -94,6 +94,7 @@ import com.android.phone.common.dialpad.DialpadView;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.annotations.VisibleForTesting;


import java.util.HashSet;
import java.util.HashSet;
import java.util.Locale;


import static com.android.internal.telephony.PhoneConstants.SUBSCRIPTION_KEY;
import static com.android.internal.telephony.PhoneConstants.SUBSCRIPTION_KEY;


@@ -922,6 +923,7 @@ public class DialpadFragment extends AnalyticsFragment
     * @param invoker the View that invoked the options menu, to act as an anchor location.
     * @param invoker the View that invoked the options menu, to act as an anchor location.
     */
     */
    private PopupMenu buildOptionsMenu(View invoker) {
    private PopupMenu buildOptionsMenu(View invoker) {
        invoker.setLayoutDirection(TextUtils.getLayoutDirectionFromLocale(Locale.getDefault()));
        final PopupMenu popupMenu = new PopupMenu(getActivity(), invoker) {
        final PopupMenu popupMenu = new PopupMenu(getActivity(), invoker) {
            @Override
            @Override
            public void show() {
            public void show() {