ConstraintLayoutをもうちょっと深く知ってみる

7166bc2cbc462ab5fd1987a76d0fe709?s=47 takahirom
September 15, 2017
120

 ConstraintLayoutをもうちょっと深く知ってみる

7166bc2cbc462ab5fd1987a76d0fe709?s=128

takahirom

September 15, 2017
Tweet

Transcript

  1. 24.

    $POTUSBJOU4FU׾⢪׏ג#JBT
 ׾㢌刿 val constraintSet = ConstraintSet() constraintSet.clone(constraintLayout) val bias =

    0.5F constraintSet
 .setVerticalBias(R.id.button, bias) constraintSet.applyTo(constraintLayout) $POTUSBJOU-BZPVUך؎ٝأةٝأַ׵ $POTUSBJOU4FU׾《䖤
  2. 25.

    $POTUSBJOU4FU׾⢪׏ג#JBT
 ׾㢌刿 val constraintSet = ConstraintSet() constraintSet.clone(constraintLayout) val bias =

    0.5F constraintSet
 .setVerticalBias(R.id.button, bias) constraintSet.applyTo(constraintLayout) JE׾䭷㹀׃ג#JBT׾㢌刿ׅ׷
  3. 26.

    $POTUSBJOU4FU׾⢪׏ג#JBT
 ׾㢌刿 val constraintSet = ConstraintSet() constraintSet.clone(constraintLayout) val bias =

    0.5F constraintSet
 .setVerticalBias(R.id.button, bias) constraintSet.applyTo(constraintLayout) ٖ؎،ؐزח⿾僥
  4. 44.

    1MBDFIPMEFS ˖ ֿ׸㹋鄲׃׋ְ׏גז׏׋׵
 וֲװ׏גװ׶תׅ $POTUSBJOU-BZPVU׾⢪ֲהֿ׸׌ֽד㹋鄲דֹתׅ val onClickListener: (View) -> Unit

    = { view -> TransitionManager.beginDelayedTransition(root as ViewGroup) placeholder.setContentId(view.id) } imageA.setOnClickListener(onClickListener) imageB.setOnClickListener(onClickListener) imageC.setOnClickListener(onClickListener) imageD.setOnClickListener(onClickListener)
  5. 46.

    1MBDFIPMEFS 如ח1MBDFIPMEFS׾鏣縧ׅ׷ <android.support.constraint.Placeholder android:id="@+id/placeholder" ... app:content="@+id/image_d" ... /> ֿֿדכ㣐ֹֻׅ׷״ֲח1MBDFIPMEFSח
 $POTUSBJOU׾鏣㹀

    䊩〸ַ׵ךꥴ꟦ז׃זו  app:content=“@+id/image_d” ך״ֲח$IBJOך⚥ח֮׷7JFXךJE׾
 鏣㹀ׅ׷ֿהד䊩ך״ֲז邌爙חז׷
  6. 47.

    1MBDFIPMEFS 5SBOTJUJPO.BOBHFSCFHJO%FMBZFE5SBOTJUJPO  ד،صً٦ءׇׁّٝאאծ
 QMBDFIPMEFSTFU$POUFOU*Eׅ׸ל䊩ך״ֲחז׷ val onClickListener: (View) -> Unit

    = { view -> TransitionManager.beginDelayedTransition(root as ViewGroup) placeholder.setContentId(view.id) } imageA.setOnClickListener(onClickListener) imageB.setOnClickListener(onClickListener) imageC.setOnClickListener(onClickListener) imageD.setOnClickListener(onClickListener)