2
ConstraintLayoutはAndroidの新機能ですので、誰でもtools:layout_constraintBaseline_creator="0"
が何であるか知っていて、それが属性にどのような目的を果たしますか。以下は私のコードです。ツールとは何ですか?ConstraintLayoutのlayout_constraintBaseline_creator属性?
<Button
android:text="Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:layout_editor_absoluteX="144dp"
tools:layout_editor_absoluteY="39dp"
android:id="@+id/button2"
app:layout_constraintLeft_toRightOf="@+id/button"
android:layout_marginLeft="40dp"
android:layout_marginStart="40dp"
tools:layout_constraintLeft_creator="0"
app:layout_constraintBaseline_toBaselineOf="@+id/button"
tools:layout_constraintBaseline_creator="0" />
"creator"属性は、誰が制約を作成したか(あなた、自動推論、自動接続など)を知るために使用されます。これは、デザイナーがあなたがしたことを思い出し、それに応じて驚きを避けるようにします(たとえば、自動推論をクリックすると、作成した制約はエディタによって破棄されません)。 –
これをどこかで文書化することは素晴らしいことです。 –
@RomainGuyビジュアルエディタではなくXMLで直接作業したい人向けにlayout_edit_absoluteX、Yなどを生成するのを止めることができれば幸いです –