Slide 1

Slide 1 text

+BWBͰॻ͔Εͨ"OESPJEΞϓϦΛ
 ,PUMJOͰॻ͖௚͢·Ͱͷ࿩ ू·Ε,PUMJO޷͖,PUMJOѪ޷ձWPM

Slide 2

Slide 2 text

ٶԼཽେ࿠ $IBU8PSLגࣜձࣾ ΫϥΠΞϯτΞϓϦέʔγϣϯ։ൃ෦ !SZVHPP@ ޷͖ͳ,PUMJOͷػೳ͸4NBSU$BTU

Slide 3

Slide 3 text

$IBU8PSL

Slide 4

Slide 4 text

$IBU8PSL ‣ Ϗδωε޲͚ͷνϟοταʔϏε 8FCJ04"OESPJEσεΫτοϓΞϓϦͰఏڙ "OESPJEΞϓϦ͸೥຤͔Β+BWB੡ ‣ ʙ·Ͱ͸5JUBOJVN +BWB4DSJQU ੡ͩͬͨ ‣ +BWB൛͸͔Β։ൃΛ։࢝ ‣ ,PUMJOΛݕ౼͢ΔͨΊʹͷ,PUMJOษڧձʹࢀՃ ‣ ࠾༻ڧԽத J04"OESPJE4DBMB1)143&ͳͲ ৄ͘͠͸8FCαΠτͰ ‣ IUUQTDPSQDIBUXPSLDPNKBSFDSVJU ‣ ؾʹͳΔ͜ͱ͕͋ͬͨΒ੠͔͚ͯԼ͍͞

Slide 5

Slide 5 text

,PUMJO

Slide 6

Slide 6 text

,PUMJO ‣ (PPHMF*0Ͱ"OESPJEެࣜݴޠԽ ͦΕ·Ͱ΋,PUMJOͷ։ൃࣄྫ͸ଟ͋ͬͨ͘ ެࣜݴޠʹͳΔ͜ͱͰ҆৺ΛखʹೖΕͨ طଘͷΞϓϦͱͷ෇͖߹͍ํΛͲ͏͢Δ͔ʁ ‣ ෦෼తʹಋೖPSશ໘తʹಋೖ ͜Εͱ͍ͬͨਖ਼ղ͸ͳ͍ ৽نϓϩδΣΫτͳΒ͹,PUMJOͰྑ͍ $IBU8PSLͰ͸શ໘తͳಋೖΛܾఆͨ͠

Slide 7

Slide 7 text

Ͳ͔͜Β ‣ ಋೖ౰ॳ͸શ໘తͳಋೖ༧ఆ͸ͳ͔ͬͨ খ͞ͳμΠΞϩά͔ͭΒಋೖΛ։࢝ ‣ (PPHMF*0ͷཌ೔͔Βελʔτ ࣍ʹطଘͷը໘Λͭॻ͖׵͑ͯΈͨ ৽͍͠ػೳͷ௥ՃΛ,PUMJOͰॻ͍ͯΈͨ ‣ +BWBͱͷͭͳ͗ࠐΈ͕ωοΫʹͳ͍ͬͯͬͨ ͔֬ʹ,PUMJO͸+BWBͱͷ࿈ܞ͸όονϦͰ͖Δ ͏·͘࿈ܞ͢Δʹ͸ಛผͳҙࣝ෇͚͕ඞཁ ‣ !+WN'JFME!+WN4UBUJD!+WN0WFSMPBET ‣ SFUVSO6OJU*/45"/$& ‣ 1MBUGPSN5ZQFT

Slide 8

Slide 8 text

!+WNʙΞ ϊςʔγϣϯ ‣ +BWB͔ΒͷΞΫηεΛҙࣝ͢Δඞཁ͕͋Δ class MyFragment : Fragment() { companion object { @JvmField val TAG: String = MyFragment::class.java.simpleName } @JvmOverloads fun logic(label: String = "") {} } ,PUMJO

Slide 9

Slide 9 text

SFUVSO6OJU*/45"/$& ‣ ,PUMJOʹ͸lWPJEz͸ଘࡏ͠ͳ͍ class BusinessLogic { fun async(callback: () -> Unit) { // Some async logic callback(); } } BusinessLogic logic = new BusinessLogic(); logic.async(() -> { return Unit.INSTANCE; }); ,PUMJO +BWB

Slide 10

Slide 10 text

IUUQTEJTDVTTLPUMJOMBOHPSHUKBWBJOUFSPQVOJUDMPTVSFTSFRVJSFEUPSFUVSOLPUMJOVOJU !+WN7PJEͷఏҊ ೥ʹಉ͡໰୊ఏى

Slide 11

Slide 11 text

1MBUGPSN5ZQFT ‣ /PO/VMM͔/VMMBCMF͔એݴ͞Ε͍ͯͳ͍ܕ ܕ৘ใΛݟΔͱlzϚʔΫ͕෇͍͍ͯΔ ‣ "OESPJE4%,͸جຊతʹ1MBUGPSN5ZQFT ‣ !/PO/VMM!/VMMBCMF͕෇͍ͯͨΒϥοΩʔ

Slide 12

Slide 12 text

1MBUGPSN5ZQFT ‣ "OESPJE4%,Ͱ͋Ε͹ίʔυΛಡΜͰܕΛܾఆ͢Δ val inflater: LayoutInflater = LayoutInflater.from(this) ,PUMJO

Slide 13

Slide 13 text

,PUMJOͷ͏·ຯΛҾ͖ग़͍ͨ͠ ‣ ,PUMJOΛ෦෼తʹಋೖ͢Δͱ+BWBʹ΋Өڹ͕ग़Δ ٯʹ+BWBͷ࣮૷͕,PUMJOʹ΋Өڹ͢Δ ‣ +BWB0QUJPOBMWT,PUMJO/PO/VMM/VMMBCMF5ZQF ࣗ෼ୡ͕ॻ͍ͨ+BWBͷίʔυΛݟฦ͢ ‣ !/PO/VMM!/VMMBCMFΞ ϊςʔγϣϯΛ෇͚͍ͯ͘ʁ ‣ ͍ͬͦͷ͜ͱ,PUMJOʹஔ͖׵͑ͨํ͕ྑ͍ͷͰ͸ͳ͍͔ʁ ‣ ͭͣͭஸೡʹ,PUMJOԽΛਐΊ͍ͯ͘ ਓͷνʔϜ಺Ͱ΋,PUMJOͷशख़౓͸όϥόϥ ૬ޓʹϨϏϡʔΛ͠ͳ͕ΒཧղΛਂΊ͍ͯ͘ 1VMM3FRVFTUʹ,PUMJOͷݴޠػೳͷઆ໌Λॻ͘

Slide 14

Slide 14 text

,PUMJOͷ͏·ຯΛҾ͖ग़͢ಓఔ (PPHMF*0b $IBU8PSL"OESPJE
 7FSTJPO 'VMM+BWB ߦ $IBU8PSL"OESPJE
 7FSTJPO 'VMM,PUMJO ߦ Ի੠௨࿩ "OESPJE ߦ

Slide 15

Slide 15 text

,PUMJOͷ͏·ຯΛҾ͖ग़ͨ݁͠Ռ ‣ ϲ݄ͰશͯͷίʔυΛ,PUMJOԽͨ͠ ͦͷؒʹػೳ௥Ճ΍ϦϑΝΫλϦϯά΋Ͱ͖ͨ ,PUMJOԽલޙͰίʔυͷྔ͸ʹͳͬͨ ‣ νʔϜ΁ͷਁಁͱޮՌ /VMM1PJOUFS&YDFQUJPOͷ๾໓ ‣ ΄΅ग़ձ͍ͬͯͳ͍ ‣ 1MBUGPSN5ZQFTͷऔΓѻ͍͕పఈ͞Εͨ ‣ +BWBͷ0QUJPOBMΑΓ΋औΓѻָ͍͕ ίʔυͷՄಡੑͷ޲্ ‣ جຊ͸WBMͰڱ͍ൣғͰWBSΛ࢖͏ͳͲͷҙࣝ෇͚

Slide 16

Slide 16 text

,PUMJOͷ͏·ຯΛҾ͖ग़ͨ͢Ίʹ ‣ ,PUMJOଆͷ࣮૷΋ݟͨํ͕ྑ͍ ྫ͑͹NBQˠUP-JTUͷྲྀΕ ‣ +BWBͷ4USFBNΛ࢖ͬͯΔͱ͍ͭ΍Γͨ͘ͳΔ ‣ ࣮ࡍ͸NBQͷ࣌఺Ͱ-JTU3͕ಘΒΕΔ val results: List = someCollection .map { it.convert() } .toList() ,PUMJO

Slide 17

Slide 17 text

,PUMJOͷ͏·ຯΛҾ͖ग़ͨ͢Ίʹ ‣ 4IPX,PUMJO#ZUFDPEFˠ%FDPNQJMF͢Δ val source = listOf(1, 2, 3, 4, 5) val results: List = source .map { it.toString(10) } ,PUMJO UP-JTUແ UP-JTU༗

Slide 18

Slide 18 text

,PUMJOͷ͏·ຯΛҾ͖ग़͠ଛͶͨࣄྫ ‣ ,PUMJOͱ"OESPJE +%, ͷ"1*͕ಉ໊͡લ ‣ ਖ਼ղ͸൪ԼͷGPS&BDIͰͨ͠ʂ ൪Լ͸LPUMJODPMMFDUJPOTGPS&BDI ‣ .BQͷ֦ுؔ਺ͱͯ͠ఆٛ͞Ε͍ͯΔ ্͔ΒͭΊ͸KBWBVUJM.BQGPS&BDI ‣ "OESPJEͰ࢖͑ΔΑ͏ʹͳͬͨͷ͸-W͔Β ‣ /P$MBTT%FG'PVOE&SSPS͕ൃੜͨ͠

Slide 19

Slide 19 text

࠷ޙʹ

Slide 20

Slide 20 text

࠷ޙʹ ‣ طଘͷΞϓϦ΋ஈ֊తʹ,PUMJOԽ͍͚ͯ͠Δ ͨ +BWBͱͷ૬ޓӡ༻ੑͷߴ͞ ‣ த్൒୺ʹಋೖ͢Δ͙Β͍ͳΒ͹શͯॻ͖׵͍͑ͨ +BWBͱ,PUMJOؒͰͦΕͧΕΛҙࣝ͢Δखؒ ‣ ਓखͰؾΛ͚ͭͳ͍ͱ͍͚ͳ͍Օॴ͸ඞͣࣄނ͕ੜ·ΕΔ ‣ ଞνʔϜ͔Βݟͨ৺ཧతোน͕Լ͕ͬͨ ෭࣍తͳޮՌ ‣ J04νʔϜ͕,PUMJOͷίʔυΛಡΜͰ4XJGUʹҠ২ ‣ 4DBMB ؚ4DBMB+4 5ZQF4DSJQU࢖͍΋༰қʹಡΊΔ

Slide 21

Slide 21 text

͓͠·͍