簡體   English   中英

如何使用波斯語在水平線性布局中設置按鈕?

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

我必須在linearLayout按鈕。 linearLayout是水平的。

我的問題是當移動語言從英語變為波斯語時,因為在那之后按鈕的 position 相互交換。

我怎樣才能避免這種情況?

LinearLayout不支持交換 childView。

您可以使用FrameLayoutRelativeLayout從頂部動態控制此按鈕的邊距。

在您的AndroidManifest.xml中,您需要設置supportsRtl=false以禁用更改布局以支持 RTL 語言。

像這樣:

<application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="false"
        >

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM