Dies ist meine Layout-Datei.ConstraintLayout layout_constraintHorizontal_bias scheint nicht zu funktionieren
<?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">
<EditText
android:layout_width="150dp"
android:layout_height="50dp"
android:hint="please input test content"
android:inputType="phone"
android:textColorHint="@android:color/holo_red_light"
android:textSize="13sp"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintRight_toLeftOf="parent" />
<TextView
android:layout_width="80dp"
android:layout_height="50dp"
android:gravity="center"
android:text="Hello"
android:textColor="@android:color/black"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintHorizontal_bias="0.5" />
</android.support.constraint.ConstraintLayout>
Folgen Sie Bild ist Vorschauansicht.
Ich möchte Textview bewegen, um Eltern Blick auf center_horizontal, aber layout_constraintHorizontal_bias=0.5"
scheint nicht zu funktionieren.
Wer hat Ideen für dieses Problem? Danke erstmal!
Wie lautet Ihre erwartete Ausgabe? –
@Nilu TextView zur Mitte verschieben Horizontal – Cyrus
@Cyrus Möchten Sie dies nur durch ConstraintLayout erreichen? –