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

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

takahirom
September 15, 2017
170

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

takahirom

September 15, 2017
Tweet

Transcript

  1. $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. $POTUSBJOU4FU׾⢪׏ג#JBT
 ׾㢌刿 val constraintSet = ConstraintSet() constraintSet.clone(constraintLayout) val bias =

    0.5F constraintSet
 .setVerticalBias(R.id.button, bias) constraintSet.applyTo(constraintLayout) JE׾䭷㹀׃ג#JBT׾㢌刿ׅ׷
  3. $POTUSBJOU4FU׾⢪׏ג#JBT
 ׾㢌刿 val constraintSet = ConstraintSet() constraintSet.clone(constraintLayout) val bias =

    0.5F constraintSet
 .setVerticalBias(R.id.button, bias) constraintSet.applyTo(constraintLayout) ٖ؎،ؐزח⿾僥
  4. 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. 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. 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)