Ich versuchte mit ChainStyle, aber hat nicht funktioniert. Bitte schlagen Sie eine Lösung vor. enter image description herezentrale Ausrichtung in constraintLayout
Ich möchte diese Schaltflächen zentral wie die beiden obigen Textansichten ausrichten. Ich habe hier den Code für die '+3 Punkte'-Schaltfläche angegeben.
Ich möchte dies mit ChainStyle implementieren. Was soll ich dafür tun?
<Button
android:id="@+id/points_3A"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:background="#EEEEEE"
android:onClick="points3"
android:paddingLeft="30dp"
android:paddingRight="30dp"
android:text="+3 points"
app:layout_constraintRight_toLeftOf="@+id/points_3B"
app:layout_constraintTop_toBottomOf="@id/team_a_score"
app:layout_constraintHorizontal_chainStyle="spread"/>
<Button
android:id="@+id/points_3B"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:background="#EEEEEE"
android:onClick="points3"
android:paddingLeft="30dp"
android:paddingRight="30dp"
android:text="+3 points"
app:layout_constraintLeft_toRightOf="@+id/points_3A"
app:layout_constraintTop_toBottomOf="@id/team_b_score" />
Gibt es eine Möglichkeit, dies mit ChainStyle zu implementieren? –