Jetpack Compose

Jetpack Compose

19/05/17
Shibuya.apk #34 - Report from Google I/O 2019

Ad449f3f4e595ade283a30c4f66010be?s=128

HiroYUKI Seto

May 17, 2019
Tweet

Transcript

  1. +FUQBDL$PNQPTF גࣜձࣾϊϋφɹ੉ށ༏೭

  2. ੉ށ༏೭!TFUP@IJ גࣜձࣾϊϋφ ΞϓϦΤϯδχΞ

  3. None
  4. *FOKPZFE*0

  5. 8IBU`T+FUQBDL$PNQPTF

  6. ⚠&YQFSJNFOUBM"1*⚠ OPUSFBEZGPSQSPEVDUJPOVTF

  7. 8IBU`T+FUQBDL$PNQPTF w +FUQBDLϥΠϒϥϦͷͻͱͭͱͯ͠ఏڙ͞ΕΔ w એݴత6*ߏங w "OLP΍'MVUUFSͱࣅͨهड़ w YNMͰͷMBZPVUͷ୅ସ w

    طଘͷ7JFXͷ୅ସ w ޓ׵ੑΛ࣋ͨͤΔ͜ͱ͕Ͱ͖Δ
  8. 8IZ+FUQBDL$PNQPTF

  9. 6OCVOEMFUIF6*5PPMLJU w $IFU)BBTFTBZTl"1*EFTJHOJTCVJMEJOHGVUVSFSFHSFUz w 7JFXKBWB͸ສߦऑ w #VUUPOFYUFOET5FYU7JFX w ճస͠ͳ͍4QJOOFS w

    7JFXΛ+FUQBDLԽ͍ͨ͠ w 04ΞοϓσʔτΛ଴ͭ͜ͱͳ͘όάΛमਖ਼Ͱ͖Δ
  10. +FUQBDL$PNQPTFݪଇ w ,PUMJOͰ؆ܿʴࣗવʹॻ͚Δ w એݴత w ޓ׵ੑ͕͋Δ w ඒ͍͠ΞϓϦΛ࡞ΕΔ w

    ։ൃΛՃ଎͢Δ IUUQTEFWFMPQFSBOESPJEDPNKFUQBDLDPNQPTFDPSF@QSJODJQMFT
  11. )PXUPVTF

  12. )PXUPVTF w IUUQTBOESPJEHPPHMFTPVSDFDPNQMBUGPSNGSBNFXPSLT TVQQPSU BOESPJEYNBTUFSEFWVJ3&"%.&NEHFUUJOH TUBSUFE w ϥΠϒϥϦԽ͞Ε͍ͯͳ͍ w BOESPJE9ͷ։ൃ؀ڥߏங͕ඞཁ

  13. )PXUPVTF override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) 
 setContent {


    Text("hello")
 }
 } ˞setContent͸"DUJWJUZͷ֦ுؔ਺
  14. )PXUPVTF @Composable fun Greeting(name: String) { Text(name) }

  15. )PXUPVTF @Composable @GenerateView fun Greeting(name: String) { Text(name) }

  16. !(FOFSBUF7JFX w YNMͰఆٛͰ͖Δ • <GreetingView /> w findViewById(R.id.greeting)

  17. )PXUPVTF @Composable fun RallyBody() { Padding(padding = 16.dp) { Column

    { // TODO: scrolling container RallyAlertCard() HeightSpacer(height = 10.dp) RallyAccountsCard() HeightSpacer(height = 10.dp) RallyBillsCard() } } }
  18. ·ͱΊ

  19. ·ͱΊ w ⚠&YQFSJNFOUBM⚠ w એݴత6*ߏங w طଘͷ7JFXΛஔ͖׵͑Δ΋ͷ w BOOPUBUJPOͰޓ׵ੑ͕อͯΔ w

    ઈࢍҙݟืूத
  20. ࢀߟϦϯΫ w +FUQBDL$PNQPTF
 IUUQTEFWFMPQFSBOESPJEDPNKFUQBDLDPNQPTF w +FUQBDL$PNQPTF3&"%.&NE
 IUUQTBOESPJEHPPHMFTPVSDFDPNQMBUGPSNGSBNFXPSLT TVQQPSU BOESPJEYNBTUFSEFWVJ3&"%.&NE w

    %FDMBSBUJWF6*1BUUFSOT (PPHMF*0` 
 IUUQTZPVUVCF7T4UZR-[YP
  21. None