我正在为平板电脑开发Android应用,当我为 ldrtl创建布局时,该应用将采用希伯来语语言从右到左 它创建的很好,当我创建 xlarge 布局时,它也会创建它(我可以在设计模式中看到它),但是当我尝试创建时ldrtl-xlarge 布局,只是使它成为ldrtl,但不是真正的xlarge (它仍然是常规尺寸视图)! 有人有主意吗?
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.raghdak.wardm.smartcourierclient.newShipmentActivity">
<Button
android:id="@+id/btnBack"
android:layout_width="114dp"
android:layout_height="wrap_content"
android:layout_marginBottom="40dp"
android:layout_marginEnd="16dp"
android:text="@string/btnBack"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<CheckBox
android:id="@+id/urgentCheckBox"
android:layout_width="97dp"
android:layout_height="32dp"
android:layout_marginStart="36dp"
android:layout_marginTop="28dp"
android:text="@string/urgent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/dueDateText"
android:layout_width="94dp"
android:layout_height="35dp"
android:layout_marginStart="36dp"
android:layout_marginTop="16dp"
android:text="@string/dueDate"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/urgentCheckBox" />
<TextView
android:id="@+id/claimantText"
android:layout_width="92dp"
android:layout_height="39dp"
android:layout_marginStart="40dp"
android:layout_marginTop="20dp"
android:text="@string/claimant"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/dueDateText" />
<EditText
android:id="@+id/claimantEditText"
android:layout_width="217dp"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="124dp"
android:ems="10"
android:inputType="textPersonName"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.887"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.021" />
<EditText
android:id="@+id/dueDateEditText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="76dp"
android:ems="10"
android:inputType="date"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.888"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />
<TextView
android:id="@+id/addressText"
android:layout_width="88dp"
android:layout_height="38dp"
android:layout_marginStart="44dp"
android:layout_marginTop="24dp"
android:text="@string/address"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/claimantText" />
<EditText
android:id="@+id/addressEditText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:ems="10"
android:inputType="textPersonName"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.888"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/claimantEditText"
app:layout_constraintVertical_bias="0.033" />
<TextView
android:id="@+id/nameText"
android:layout_width="84dp"
android:layout_height="34dp"
android:layout_marginStart="48dp"
android:layout_marginTop="20dp"
android:text="@string/receiverName"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/addressText" />
<EditText
android:id="@+id/nameEditText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:ems="10"
android:inputType="textPersonName"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.888"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/addressEditText"
app:layout_constraintVertical_bias="0.019" />
<TextView
android:id="@+id/phoneText"
android:layout_width="83dp"
android:layout_height="27dp"
android:layout_marginStart="48dp"
android:layout_marginTop="24dp"
android:text="@string/phone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/nameText" />
<EditText
android:id="@+id/phoneEditText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:ems="10"
android:inputType="textPersonName"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.888"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/nameEditText"
app:layout_constraintVertical_bias="0.0" />
<TextView
android:id="@+id/poboxText"
android:layout_width="80dp"
android:layout_height="29dp"
android:layout_marginStart="52dp"
android:layout_marginTop="20dp"
android:text="@string/pobox"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/phoneText" />
<EditText
android:id="@+id/poboxEditText"
android:layout_width="215dp"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:ems="10"
android:inputType="textPersonName"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.888"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/phoneEditText"
app:layout_constraintVertical_bias="0.071" />
<Button
android:id="@+id/btnSave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="40dp"
android:layout_marginStart="44dp"
android:text="@string/save"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
图片: ldrtl
答案 0 :(得分:0)