Skip to content Skip to sidebar Skip to footer

How To Change The Direction Of A Popup Menu Item From Right To Left?

I know this question was asked many times and I used many solutions but it doesn't work for me . I want to change the direction of my Menu to rtl using a Popup but It doesn't work

Solution 1:

I found a solution .

Making my own style like this

<stylename="menuStyle"><itemname="android:layoutDirection">rtl</item></style>

Then add this code

ContextmyContext=newContextThemeWrapper(MainActivity.this,R.style.menuStyle); 
PopupMenupopupMenu=newPopupMenu(myContext , myView);

Post a Comment for "How To Change The Direction Of A Popup Menu Item From Right To Left?"