New Layout Editor with Constraint Layout

New Layout Editor with Constraint Layout

0ef9d512061aa068aafd47c3e3f13ce0?s=128

Yuki Shiho

May 25, 2016
Tweet

Transcript

  1. /FX-BZPVU&EJUPS XJUI$POTUSBJOU-BZPVU ࢤำါل !TIJIPDIBO !QPUBUPUJQT 

  2. ࣗݾ঺հ ࢤำါلʢ͠΄Ώ͏͖ʣ !TIJIPDIBO !TIJIPDIBOEFTV

  3. None
  4. Introducing ConstraintLayout

  5. (PPHMF*0Ͱൃද͞Εͨ৽͍͠ϨΠΞ΢τ ϨΠΞ΢τΛϚςϦΞϧσβΠϯʹ४ڌͨ͠࠷దͳҐ ஔʹࣗಈௐ੔ ಛ௃ (6*ϕʔεͰϨΠΞ΢τΛ࡞੒ "OESPJE4UVEJP͕ࣗಈͰYNMΛੜ੒ "VUP$POOFDUͱ*OGFSFODFʹΑΔϨΠΞ΢τ੍໿ "1*dରԠ "CPVU$POTUSBJOU-BZPVUʢʣ

  6. ࢖༻ཁ݅ "OESPJE4UVEJPWQSFWJFXd +%,d "CPVU$POTUSBJOU-BZPVUʢʣ

  7. $POTUSBJOU-BZPVUಋೖʢʣ a. Click Tools > Android > SDK Manager. b.

    Click the SDK Tools tab. c. Select Android Support Repository, then click OK. 1. Ensure you have the latest Android Support Repository (version 32 or higher):
  8. $POTUSBJOU-BZPVUಋೖʢʣ dependencies { compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha1' } 2. Add the Constraint

    Layout library as a dependency in your build.gradle file: 3. In the toolbar or sync notification, click Sync Project with Gradle Files.
  9. $POTUSBJOU-BZPVUಋೖʢʣ 4. Create Layout resource file and Add ConstraintLayout. <?xml

    version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent"> </android.support.constraint.ConstraintLayout> 5. Select Design tab and makes layout.
  10. "VUP$POOFDUJOBDUJPO

  11. "EEJOHBDPOTUSBJOUUPUIFMBZPVUFEHF

  12. "DPOTUSBJOUCFUXFFOUXPWJFXT Adding a constraint to the anchor on another view

    Adding a baseline constraint between views
  13. $FOUFSJOHBWJFXCZBEEJOHBDPOTUSBJOUPOCPUITJEFT

  14. 5IF1SPQFSUJFTXJOEPX

  15. খن໛Ͱόϯυϧ͞Ε͍ͯͳ͍ϥΠϒϥϦ "1*dରԠ ։ൃεϐʔυͷ޲্ ύϑΥʔϚϯεͷ޲্ ϨΠΞ΢τͷෆཁͳωετ͕ݮΔ 

  16. ੜ੒͞ΕͨYNMͷՄಡੑ͕ѱ͍ BUUSJCVUFT͕ଟ͍ ίʔυϨϏϡʔ͕Ͱ͖ͳ͍ ੜ੒͞ΕͨYNMʹखΛೖΕͳ͍΄͏͕ྑͦ͞͏ɾɾɾ