ConstraintLayout
Yönergeleri, RTL'yi destekliyor mu? Sağında bir profil resmi ve kullanıcı bilgisi olan bir View
oluşturuyorum. Fotoğrafın genişliğin% 30'unu almasını ve kullanıcı adı ile detayların% 70'ini almasını istiyorum. Kurallar için geçerli bir kullanım durumu mu? Diğer uygulamalardan haberdarım, ancak kılavuzların burada kullanılıp kullanılamayacağını merak ediyordum. karşılaştığım sorun pozisyon açıktır içinde kılavuz kalmasıdır xml bir RTL dili BuradaConstraintLayout desteğinde yönergeler yapın RTL
için cihazlar dilini değiştirdikten sonra sol:
<?xml version="1.0" encoding="utf-8"?>
<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">
<ImageView
android:id="@+id/imageView"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:background="@color/colorPrimary"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24sp"
tools:text="Full Name"
app:layout_constraintTop_toTopOf="@+id/imageView"
app:layout_constraintStart_toEndOf="@+id/guideline2" />
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
tools:text="Android Developer"
app:layout_constraintBottom_toBottomOf="@+id/imageView"
app:layout_constraintStart_toEndOf="@+id/guideline2" />
<android.support.constraint.Guideline
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/guideline2"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.30" />
</android.support.constraint.ConstraintLayout>
Teşekkürler, yalnızca sorun izleyiciyi kontrol ettim ve raporun bulunduğunu tespit ettim: https://issuetracker.google.com/issues/38101983 – Ibrahim
Teşekkürler, ben de ona göz kulak olacağım. – auval
Sorun resmi olarak ConstraintLayout 1.1.0 beta 3 https://androidstudio.googleblog.com/2017/10/constraintlayout-110-beta-3-is-now.html – Ibrahim