android 布局显示bug,在方向改变后加载"layout-ldltr"布局的android bug是否对"layout-ldrtl"?...

萨拉姆.

在我的项目中,我必须为语言和语言创建两者layout-ldltr和layout-ldrtl布局.Right-To-LeftLeft-To-Right

我启动了从右到左语言的应用程序,每件事都很好.但是当方向改变时,android加载layout-ldltr布局反对layout-ldrtl,虽然当前Locale设置为RTL语言!

怎么解决这个问题?!

在 AndroidManifest.xml

android:name=".QuranApplication"

android:allowBackup="true"

android:icon="@mipmap/ic_launcher"

android:label="@string/app_name"

android:supportsRtl="true"

android:theme="@style/AppTheme">

在layout-ldrtl\activity_main.xml:

xmlns:app="http://schemas.android.com/apk/res-auto"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:orientation="vertical"

android:layoutDirection="rtl">

android:id="@+id/drawer_layout"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layout_weight="1"

android:layoutDirection="rtl">

android:id="@+id/content_frame"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layoutDirection="rtl"/>

layout="@layout/list_view"

android:layout_width="@dimen/drawer_width"

android:layout_height="match_parent"

android:layout_gravity="start" />

UPDATE

在@JohanShogun评论之后,我改变android:layoutDirection="rtl"了android:layoutDirection="locale"并解决了大多数项目的问题.

在第一张照片中,所有元素都显示非常好:

EUkNn.jpg

在横向模式下,在粘贴在屏幕顶部的标题项中的StickyListHeader列表视图中,从ltr布局使用android !:

f7iVz.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值