![](/img/trans.png)
[英]Why are my Button views in my horizontal LinearLayout set to a fixed width regardless of how I change the padding?
[英]How to set the button in horizontal linearLayout with Persian language?
我必須在linearLayout
按鈕。 linearLayout
是水平的。
我的問題是當移動語言從英語變為波斯語時,因為在那之后按鈕的 position 相互交換。
我怎樣才能避免這種情況?
LinearLayout
不支持交換 childView。
您可以使用FrameLayout
或RelativeLayout
從頂部動態控制此按鈕的邊距。
在您的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.