3
누군가가 왜 rtl로 전환 할 때 ConstraintLayout이 모든 요소를 중앙에 배치하는지 알고 있습니까?ConstraintLayout을 RTL 용으로 올바르게 작성하는 방법은 무엇입니까?
android:supportsRtl="true"
in manifest가 설정됩니다.
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
android:id="@+id/activity_book_shelf"
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.hekayh.ereader.BookShelfActivity"
android:layout_gravity="start"
>
<TextView
android:text="TextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView5"
/>
<TextView
android:text="AnotherTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="start"
android:id="@+id/textView6"
app:layout_constraintEnd_toEndOf="@id/textView5"
tools:layout_editor_absoluteX="277dp"
app:layout_constraintTop_toTopOf="@+id/activity_book_shelf"
android:layout_marginTop="42dp"/>
<Button
android:text="Button"
android:layout_width="91dp"
android:layout_height="51dp"
android:id="@+id/button2"
app:layout_constraintStart_toStartOf="@+id/activity_book_shelf"
android:layout_marginStart="100dp"
app:layout_constraintTop_toBottomOf="@+id/textView6"
android:layout_marginTop="24dp"
/>
</android.support.constraint.ConstraintLayout>
나는 그것의 버그 믿는다. – zoltish
예, 분명히 버그 일뿐입니다 만, Constraint Layout의 소스 코드를 사용해 그것을 고치려고했을 가능성이 있습니다. * - * – vlozful
최신의 com.android.support.constraint : constraint-layout : 1.0.0-alpha6가 발견되었습니다 이것으로부터 자유 롭다. – vlozful