Search code examples
androidandroid-layoutandroid-linearlayoutandroid-xmlandroid-button

How to set the button in horizontal linearLayout with Persian language?


I have to buttons in linearLayout. The linearLayout is horizontal.

My problem is when mobile language changes from English to Persian language because after that the position of buttons are swap each other.

How can I avoid that?


Solution

  • LinearLayout is not support swap childView.

    You can use FrameLayout or RelativeLayout to dynamically control the margin of this button from the top。