Upgrade to Pro — share decks privately, control downloads, hide ads and more …

20180427 制約付きレイアウトと仲良くする

Kei Ito
April 27, 2018

20180427 制約付きレイアウトと仲良くする

Kei Ito

April 27, 2018
Tweet

More Decks by Kei Ito

Other Decks in Programming

Transcript

  1. NBSHJO ྫ୊ͷճ౴ྫ Ҏ্ JDPO   UFYU UFYU  android:layout_width="wrap_content"

    android:layout_height="wrap_content" app:layout_constrainedWidth="true" UFYU83"1@$0/5&/5 ੍໿
  2. NBSHJO ྫ୊ͷճ౴ྫ Ҏ্ JDPO   UFYU UFYU  android:layout_width="0dp"

    app:layout_constraintWidth_min="40dp" NBSHJO."5$)@$0/453"*/5
  3. ྫ୊ͷճ౴ྫ <View android:layout_width="30dp" android:layout_height="30dp" android:id="@+id/icon" android:background="#00F" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="10dp" />

    <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toEndOf="@id/icon" app:layout_constraintEnd_toStartOf="@id/margin" android:layout_marginStart="10dp" app:layout_constrainedWidth="true" android:id="@+id/text1" android:background="#0F0" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" app:layout_constraintBottom_toBottomOf="@id/text1" app:layout_constraintStart_toEndOf="@id/text1" android:layout_marginStart="5dp" android:id="@+id/text2" android:background="#F00" /> <View android:layout_height="1dp" android:layout_width="0dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toEndOf="@id/text1" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintWidth_min="40dp" android:id="@+id/margin" android:background="#000"/>