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

Android勉強会/Android study session

Android勉強会/Android study session

学内で行なったAndroid勉強会の資料です

derapsen

March 19, 2019
Tweet

More Decks by derapsen

Other Decks in Programming

Transcript

  1. HSBWJUZMBZPVU@HSBWJUZ MBZPVU@HSBWJUZϨΠΞ΢τͷதͰͷҐஔࢦఆ༻ HSBWJUZ෦඼ͷதʢςΩετͳͲʣͷҐஔࢦఆ༻ -BZPVU DFOUFS MFGU TUBSU  UPQ MFGU

    TUBSU  CPUUPN SJHIU FOE  UPQ DFOUFS@IPSJ[POUBM UPQ DFOUFS@IPSJ[POUBM CPUUPN SJHIU FOE  CPUUPN SJHIU FOE  DFOUFS@WFSUJDBM MFGU TUBSU  DFOUFS@WFSUJDBM MBZPVU@HSBWJUZ HSBWJUZ
  2. $POTUSBJOU-BZPVU$IBJO4UZMF 7JFXΛ·ͱΊͯதԝʹدͤΔQBDLFEͷઃఆͷ࢓ํͷҰྫ # " $ QBDLFE "MBZPVU@DPOTUSBJOU5PQ@UP5PQ0GlQBSFOU MBZPVU@DPOTUSBJOU#PUUPN@UP5PQ0Gl!JE#z MBZPVU@DPOTUSBJOU4UBSU@UP4UBSU0GlQBSFOUz MBZPVU@DPOTUSBJOU&OE@UP&OE0GQBSFOU

    MBZPVU@DPOTUSBJOU7FSUJDBM@DIBJO4UZMFQBDLFE #MBZPVU@DPOTUSBJOU5PQ@UP#PUUPN0Gl!JE" MBZPVU@DPOTUSBJOU#PUUPN@UP5PQ0Gl!JE$ MBZPVU@DPOTUSBJOU4UBSU@UP4UBSU0GlQBSFOU MBZPVU@DPOTUSBJOU&OE@UP&OE0GQBSFOU MBZPVU@DPOTUSBJOU7FSUJDBM@DIBJO4UZMFlQBDLFE $MBZPVU@DPOTUSBJOU5PQ@UP#PUUPN0Gl!JE#l MBZPVU@DPOTUSBJOU#PUUPN@UP#PUUPN0GlQBSFOU MBZPVU@DPOTUSBJOU4UBSU@UP4UBSU0GlQBSFOUz MBZPVU@DPOTUSBJOU&OE@UP&OE0GlQBSFOU -BZPVU@DPOTUSBJOU˚˚@UP˛˛0Gl!JEʓʓz ˚˚˛˛ ࣗ෼૬ख ͷ7JFXͷ੍໿Λ͔͚Δล l!JEʓʓz੍໿Λ͔͚Δ૬ख7JFXͷJE
  3. 4IBSFE1SFGFSFODFT σʔλΛσόΠε಺ʹอଘ͢ΔͨΊͷ࢓૊Έɻ9.-ܗࣜͰอଘ͞Ε Δɻ4USJOH*OU'MPBU-POH#PPMFBO4USJOH4FUͷܕͰॻ͖ࠐ Έͱऔಘ͕Ͱ͖Δ ྫ  //Πϯελϯεੜ੒ val prefs =

    PreferenceManager.getDefaultSharedPreferences(applicationContext) //อଘ prefs.edit() .putString("name","Yamada Tarou") .putInt(“age",20) .putString("sex","man") .putBoolean("isStudent",true) .apply() //औಘ val name: String? = prefs.getString("name",null) val age: Int = prefs.getInt("age",0) val isStudent: Boolean = prefs.getBoolean("isStudent",false) ϝιουνΣʔϯ