Slide 1

Slide 1 text

)JSPZVLJ.PSJ !NPSJESPJE *OTJEF+FUQBDL "SDIJUFDUVSF$PNQPOFOUT

Slide 2

Slide 2 text

"7FOUVSFCFUXFFO4PGUCBOLBOE:BIPP 0OFPGCJHHFTUTFBSDIJO+BQBO

Slide 3

Slide 3 text

"SDIJUFDUVSF $PNQPOFOUT

Slide 4

Slide 4 text

-JGFDZDMFT -JWF%BUB 7JFX.PEFM 3PPN 1BHJOH %BUB#JOEJOH /BWJHBUJPO 8PSL.BOBHFS %PXOMPBE.BOBHFS .FEJB1MBZCBDL 1FSNJTTJPOT /PUJDBUJPOT 4IBSJOH 4MJDFT "OJNBUJPO5SBOTJUJPOT "VUP 578FBS &NPKJ 'SBHNFOU -BZPVU 1BMFUUF "QQ$PNQBU "OESPJE,59 .VMUJEFY 5FTU

Slide 5

Slide 5 text

-JGFDZDMFT -JWF%BUB 7JFX.PEFM 3PPN 1BHJOH %BUB#JOEJOH /BWJHBUJPO 8PSL.BOBHFS "QQ$PNQBU "OESPJE,59

Slide 6

Slide 6 text

-JGFDZDMFT -JWF%BUB 7JFX.PEFM 3PPN 1BHJOH %BUB#JOEJOH /BWJHBUJPO 8PSL.BOBHFS "QQ$PNQBU "OESPJE,59 BOESPJEBSDIMJGFDZDMF

Slide 7

Slide 7 text

-JGFDZDMF1SPCMFNT JO"OESPJE

Slide 8

Slide 8 text

JOFBSMZEBZT

Slide 9

Slide 9 text

UPEBZ խ

Slide 10

Slide 10 text

DBTF UPVDIJOHEFTUSPZFE7JFX

Slide 11

Slide 11 text

DBTFUPVDIJOHEFTUSPZFE7JFX 

Slide 12

Slide 12 text

DBTFUPVDIJOHEFTUSPZFE7JFX   Cute Cat

Slide 13

Slide 13 text

DBTFUPVDIJOHEFTUSPZFE7JFX   Cute Cat 

Slide 14

Slide 14 text

Cute Cat DBTFUPVDIJOHEFTUSPZFE7JFX     

Slide 15

Slide 15 text

DBTFUPVDIJOHEFTUSPZFE7JFX       Cute Cat

Slide 16

Slide 16 text

DBTFUPVDIJOHEFTUSPZFE7JFX       Cute Cat   

Slide 17

Slide 17 text

DBTFUPVDIJOHEFTUSPZFE7JFX       Cute Cat    

Slide 18

Slide 18 text

DBTFUPVDIJOHEFTUSPZFE7JFX       Cute Cat     

Slide 19

Slide 19 text

DBTF GFUDIJOHBUFWFSZPO$SFBUF

Slide 20

Slide 20 text

Cute Cat DBTFGFUDIJOHBUFWFSZPO$SFBUF   

Slide 21

Slide 21 text

The Japanese Bobtail is a breed of domestic cat with an unusual "bobbed" tail more closely resembling the tail of a rabbit than that of other cats. The variety is native to Japan and Southeast Asia, though it is now found throughout the world. The breed has been known in Japan for centuries, and it frequently appears in traditional folklore and art. Short Hair • Brown • White • Cute Caption Japanese Bobtail Cute Cat DBTFGFUDIJOHBUFWFSZPO$SFBUF     

Slide 22

Slide 22 text

DBTFGFUDIJOHBUFWFSZPO$SFBUF       Cute Cat

Slide 23

Slide 23 text

DBTFGFUDIJOHBUFWFSZPO$SFBUF       Cute Cat    

Slide 24

Slide 24 text

DBTFGFUDIJOHBUFWFSZPO$SFBUF       Cute Cat     

Slide 25

Slide 25 text

 Cute Cat DBTFGFUDIJOHBUFWFSZPO$SFBUF           

Slide 26

Slide 26 text

DBTF EJTQPTJOHJOXSPOHXBZ

Slide 27

Slide 27 text

 DBTFEJTQPTJOHJOXSPOHXBZ Cute Cat Cute Cat

Slide 28

Slide 28 text

Cute Cat Cute Cat  DBTFEJTQPTJOHJOXSPOHXBZ 

Slide 29

Slide 29 text

Cute Cat Cute Cat  DBTFEJTQPTJOHJOXSPOHXBZ  

Slide 30

Slide 30 text

The Japanese Bobtail is a breed of domestic cat with an unusual "bobbed" tail more closely resembling the tail of a rabbit than that of other cats. The variety is native to Japan and Southeast Asia, though it is now found throughout the world. The breed has been known in Japan for centuries, and it frequently appears in traditional folklore and art. Short Hair • Brown • White • Cute Caption Japanese Bobtail Cute Cat  DBTFEJTQPTJOHJOXSPOHXBZ       

Slide 31

Slide 31 text

The Japanese Bobtail is a breed of domestic cat with an unusual "bobbed" tail more closely resembling the tail of a rabbit than that of other cats. The variety is native to Japan and Southeast Asia, though it is now found throughout the world. The breed has been known in Japan for centuries, and it frequently appears in traditional folklore and art. Short Hair • Brown • White • Cute Caption Japanese Bobtail Cute Cat  DBTFEJTQPTJOHJOXSPOHXBZ        

Slide 32

Slide 32 text

Cute Cat Cute Cat  DBTFEJTQPTJOHJOXSPOHXBZ    

Slide 33

Slide 33 text

Cute Cat Cute Cat  DBTFEJTQPTJOHJOXSPOHXBZ     

Slide 34

Slide 34 text

4P XIBUXFTIPVE

Slide 35

Slide 35 text

DBTFUPVDIJOHEFTUSPZFE7JFX DBTFGFUDIJOHBUFWFSZPO$SFBUF DBTFEJTQPTJOHJOXSPOHXBZ

Slide 36

Slide 36 text

DBTFUPVDIJOHEFTUSPZFE7JFX DBTFGFUDIJOHBUFWFSZPO$SFBUF DBTFEJTQPTJOHJOXSPOHXBZ -JWF%BUB 7JFX.PEFMT -JWF%BUB7JFX.PEFMT

Slide 37

Slide 37 text

-JGFDZDMF0CTFSWFS

Slide 38

Slide 38 text

 

Slide 39

Slide 39 text

   

Slide 40

Slide 40 text

       

Slide 41

Slide 41 text

TVCTDSJCF TVCTDSJCF        

Slide 42

Slide 42 text

TVCTDSJCF TVCTDSJCF         FWFOUIBQQFOT

Slide 43

Slide 43 text

SFFWFOUT SFFWFOUT         FWFOUIBQQFOT

Slide 44

Slide 44 text

 

Slide 45

Slide 45 text

  

Slide 46

Slide 46 text

   

Slide 47

Slide 47 text

   

Slide 48

Slide 48 text

  

Slide 49

Slide 49 text

   

Slide 50

Slide 50 text

    

Slide 51

Slide 51 text

     

Slide 52

Slide 52 text

         

Slide 53

Slide 53 text

       

Slide 54

Slide 54 text

       

Slide 55

Slide 55 text

        &WFOU$IBOOFM

Slide 56

Slide 56 text

       

Slide 57

Slide 57 text

        1VCMJTIFS

Slide 58

Slide 58 text

       

Slide 59

Slide 59 text

       

Slide 60

Slide 60 text

       

Slide 61

Slide 61 text

     

Slide 62

Slide 62 text

-JGFDZDMF0CTFSWFS ٥0CTFSWFMJGFDZDMFT ٥%FTJHOFEBT1VC4VC ٥#PJMFSQMBUFGSFF ٥-JGFDZDMF"XBSF$PNQPOFOU

Slide 63

Slide 63 text

-JWF%BUB

Slide 64

Slide 64 text

   

Slide 65

Slide 65 text

      

Slide 66

Slide 66 text

        

Slide 67

Slide 67 text

  

Slide 68

Slide 68 text

   

Slide 69

Slide 69 text

      

Slide 70

Slide 70 text

       

Slide 71

Slide 71 text

        0O4UBSUFE 0O3FTVNFE

Slide 72

Slide 72 text

         0O4UBSUFE 0O3FTVNFE

Slide 73

Slide 73 text

         0O1BVTFE

Slide 74

Slide 74 text

         0O1BVTFE #MPDL

Slide 75

Slide 75 text

         0O%FTUSPZFE

Slide 76

Slide 76 text

         0O%FTUSPZFE

Slide 77

Slide 77 text

-JWF%BUB ٥0CTFSWBCMFEBUBIPMEFS ٥-JGFDZDMF"XBSF ٥/PMFBL

Slide 78

Slide 78 text

7JFX.PEFM

Slide 79

Slide 79 text

   

Slide 80

Slide 80 text

    

Slide 81

Slide 81 text

     

Slide 82

Slide 82 text

      

Slide 83

Slide 83 text

     

Slide 84

Slide 84 text

      

Slide 85

Slide 85 text

       

Slide 86

Slide 86 text

    

Slide 87

Slide 87 text

     

Slide 88

Slide 88 text

     

Slide 89

Slide 89 text

 /PO$POHVSBUJPO*OTUBODF

Slide 90

Slide 90 text

     

Slide 91

Slide 91 text

      

Slide 92

Slide 92 text

      

Slide 93

Slide 93 text

      

Slide 94

Slide 94 text

7JFX.PEFM ٥%BUBIPMEFS ٥4VSWJWFTDPOHVSBUJPODIBOHFT ٥/FWFSSFGFSFODFT$POUFYU

Slide 95

Slide 95 text

)PXUPVTF

Slide 96

Slide 96 text

TUFQ "EEDPNQPOFOUT

Slide 97

Slide 97 text

dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.0.0-rc02' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' } -JGFDZDMFT

Slide 98

Slide 98 text

dependencies { … def lifecycle_version = "2.0.0-rc01" implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version" } -JWF%BUB7JFX.PEFM

Slide 99

Slide 99 text

apply plugin : 'kotlin-kapt' dependencies { … def lifecycle_version = "2.0.0-rc01" implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version" kapt "androidx.lifecycle:lifecycle-compiler:$lifecycle_version" } -JGFDZDMF0CTFSWFS

Slide 100

Slide 100 text

dependencies { ... implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:0.22.5" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.22.5" implementation "com.squareup.okhttp3:okhttp:3.10.0" implementation "com.squareup.okhttp3:logging-interceptor:3.10.0" implementation "com.squareup.retrofit2:retrofit:2.4.0" implementation "com.squareup.retrofit2:converter-gson:2.4.0" implementation 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-experimental-adapter:1.0.0' implementation 'com.google.code.gson:gson:2.8.2' implementation 'androidx.recyclerview:recyclerview:1.0.0-rc02' } kotlin { experimental { coroutines "enable" } }

Slide 101

Slide 101 text

TUFQ $SFBUFDPNQPOFOUT

Slide 102

Slide 102 text

class YourViewModel : ViewModel() { }

Slide 103

Slide 103 text

class YourViewModel : ViewModel() { }

Slide 104

Slide 104 text

class YourViewModel : ViewModel() { private val _repos = MutableLiveData>() }

Slide 105

Slide 105 text

class YourViewModel : ViewModel() { private val _repos = MutableLiveData>() }

Slide 106

Slide 106 text

class YourViewModel : ViewModel() { private val _repos = MutableLiveData>() }

Slide 107

Slide 107 text

class YourViewModel : ViewModel() { private val _repos = MutableLiveData>() val repositories : LiveData> }

Slide 108

Slide 108 text

class YourViewModel : ViewModel() { private val _repos = MutableLiveData>() val repositories : LiveData> get() { if (_repos.value == null) { val repos = github.repositories() _repos.postValue(repos) } return _repos } }

Slide 109

Slide 109 text

class YourViewModel : ViewModel() { private val _repos = MutableLiveData>() val repositories : LiveData> get() { if (_repos.value == null) { val repos = github.repositories() _repos.postValue(repos) } return _repos } }

Slide 110

Slide 110 text

class YourViewModel : ViewModel() { private val _repos = MutableLiveData>() val repositories : LiveData> get() { if (_repos.value == null) { val repos = github.repositories() _repos.postValue(repos) } return _repos } }

Slide 111

Slide 111 text

class YourViewModel : ViewModel() { private val _repos = MutableLiveData>() val repositories : LiveData> get() { if (_repos.value == null) { val repos = github.repositories() _repos.postValue(repos) } return _repos } }

Slide 112

Slide 112 text

class YourViewModel : ViewModel() { private val _repos = MutableLiveData>() val repositories : LiveData> get() { if (_repos.value == null) { // Coroutine way launch(CommonPool) { val repos = github.repositories().await() _repos.postValue(repos) } } return _repos } }

Slide 113

Slide 113 text

class YourViewModel : ViewModel() { private val _repos = MutableLiveData>() val repositories : LiveData> get() { if (_repos.value == null) { // Rx way github.repositories() .observeOn(AndroidSchedulers.mainThread()) .subscribeOn(Schedulers.io()) .subscribe { repositories.postValue(it) } } return _repos } }

Slide 114

Slide 114 text

TUFQ &OKPZZPVSDPNQPOFOUT

Slide 115

Slide 115 text

class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { ... val viewModel = ViewModelProviders.of(this)[YourViewModel::class.java] } }

Slide 116

Slide 116 text

class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { ... val viewModel = ViewModelProviders.of(this)[YourViewModel::class.java] viewModel.repositories.observe(this, Observer { // update Views }) } }

Slide 117

Slide 117 text

$PODMVTJPO

Slide 118

Slide 118 text

-JGFDZDMF.BOBHFNFOU -JGFDZDMFDPNQPOFOUT JTIBSE DBODBVTFQSPCMFNT IBTTJNQMFEFTJHO :PVDBOVTFFBTJMZ

Slide 119

Slide 119 text

)JSPZVLJ.PSJ !NPSJESPJE 5IBOLZPV