$30 off During Our Annual Pro Sale. View Details »

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

Kei Ito
April 27, 2018

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

Kei Ito

April 27, 2018
Tweet

More Decks by Kei Ito

Other Decks in Programming

Transcript

  1. ੍໿෇͖ϨΠΞ΢τͱ ஥ྑ͘͢Δ .PCJMF"DU04"," JUPL!ͦΒ͔ͥ

  2. JUPL!ͦΒ͔ͥ w ͍ͱ͏͚͍ʢJUPLʣ w ɹɹɹɹɹɹͷதͷਓʢʴ෭ۀˏ͸ͯͳʣ w ϞόΠϧΞϓϦΤϯδχΞ݉$&0 w IUUQJUPLKQ IUUQTPSBLB[FDPKQ

    !JUPL@UXJU
  3. ྫ୊   Ҏ্ ॎԣՄม ԣՄม 

  4. ྫ୊   Ҏ্ ॎԣՄม ԣՄม 

  5. J04 "VUP-BZPVU

  6. "VUP-BZPVU USBJMJOHNBSHJO㱢   ॎԣՄม ԣՄม 

  7. "OESPJE

  8. $POTUSBJOU-BZPVU  ਖ਼ࣜϦϦʔε IUUQTBOESPJETUVEJPHPPHMFCMPHDPN DPOTUSBJOUMBZPVUIUNM

  9. $POTUSBJOU-BZPVU MBZPVU@DPOTUSBJOU8JEUI@NJO   ॎԣՄม ԣՄม 

  10. ͷ৽ػೳ

  11. αΠζࢦఆͷ͍Ζ͍Ζ ."5$)@1"3&/5 ਌ʹ͕ͨ͠͏ 83"1@$0/5&/5 දࣔ಺༰ʹ͕ͨ͠͏ ."5$)@$0/453"*/5 ʢEQʣ ੍໿ʹ͕ͨ͠͏ 83"1@$0/5&/5 ੍໿

    දࣔ಺༰ʹ͕ͨ͠͏ ͕ͩɺ੍໿ʹ΋͕ͨ͠͏ /&8
  12. 83"1@$0/5&/5 ੍໿ • app:layout_constrainedWidth="true|false" • app:layout_constrainedHeight="true|false"

  13. ࠷େ࠷খ • app:layout_constraintWidth_min • app:layout_constraintWidth_max • app:layout_constraintHeight_min • app:layout_constraintHeight_max ."5$)@$0/453"*/5

  14. ׂ߹ • app:layout_constraintWidth_percent • app:layout_constraintHeight_percent ஋͸ʙ ."5$)@$0/453"*/5

  15. ԁܗ഑ஔ • app:layout_constraintCircle • app:layout_constraintCircleRadius • app:layout_constraintCircleAngle

  16. NBSHJO ྫ୊ͷճ౴ྫ Ҏ্ JDPO   UFYU UFYU 

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

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

    app:layout_constraintWidth_min="40dp" NBSHJO."5$)@$0/453"*/5
  19. ྫ୊ͷճ౴ྫ <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"/>
  20. ྫ୊ͷճ౴ྫ

  21. ·ͱΊ w $POTUSBJOU-BZPVUͰෳࡶͳϨΠΞ΢τΛ࣮ݱͤ͞ Α͏ w IUUQTEFWFMPQFSBOESPJEDPNSFGFSFODF BOESPJETVQQPSUDPOTUSBJOU $POTUSBJOU-BZPVUIUNM