본문 바로가기

안드로이드 Android/Android Study Jams

(19)
7. Databases and RecyclerView - Create a Room database github.com/google-developer-training/android-kotlin-fundamentals-starter-apps/tree/master/TrackMySleepQuality-Starter google-developer-training/android-kotlin-fundamentals-starter-apps android-kotlin-fundamentals-starter-apps. Contribute to google-developer-training/android-kotlin-fundamentals-starter-apps development by creating an account on GitHub. github.com Create the SleepNight entity Andr..
6. Architecture components - LiveData transformations 보호되어 있는 글입니다.
6. Architecture components - Data binding with ViewModel and LiveData 보호되어 있는 글입니다.
6. Architecture components - LiveData and LiveData observers 보호되어 있는 글입니다.
6. Architecture components - ViewModel Explore the starter code 시작하기 GuessTheWord starter code를 다운로드하고 Android Studio에서 연다. 앱을 실행한다. 버튼을 탭한다. Skip, Got It 버튼은 구현되어 있지만 End Game은 구현되어 있지 않기 때문에 탭해도 아무 일도 일어나지 않는다. 코드 살펴보기 스타터 앱의 문제점 1. 스타터 코드를 실행하고 각 단어가 뜨고 나서 Skip과 Got It을 탭하면서 게임을 한다. 2. 게임 화면은 이제 단어와 현재 점수를 보여준다. 디바이스나 에뮬레이터를 회전해서 화면의 방향을 바꾼다. 현재 점수가 0이 되는 것에 주목하라. 3. 게임을 몇 단어 더 실행해본다. 게임 화면에 어떤 점수가 뜰 때, 앱을 닫고 다시 열어 본다. 앱의 상태가 저장되지..
4. Navigation - Start an external activity Safe Args 플러그인 설정하고 사용하기 한 Fragment에서 다른 Fragment로 데이터를 넘기는 방법 중 하나는 Bundle 클래스의 인스턴스를 사용하는 것이다. Android Bundle은 key-value store이다. dictionary 또는 associative array로도 알려진 key-value store는 연관된 값을 추출하는 고유한 키(문자열)를 사용하는 자료 구조이다. 이 기술은 효과가 있지만 앱이 실행될 때 에러를 유발할 수 있다. 발생할 수 있는 에러로는 Type mismatch errors와 Missing key error가 있다. 이런 문제를 돕기 위해 Android의 Navigation Architecture Component는 Safe Args라는 특성을 포함한다..
4. Navigation - Define navigation paths github.com/google-developer-training/android-kotlin-fundamentals-apps/tree/master/AndroidTriviaFragment google-developer-training/android-kotlin-fundamentals-apps android-kotlin-fundamentals-apps. Contribute to google-developer-training/android-kotlin-fundamentals-apps development by creating an account on GitHub. github.com 프로젝트에 내비게이션 컴포넌트 추가 최신 내비게이션 버전은 여기에서 찾을 수 있다. build.gradle (Project) e..
4. Navigation - Create a fragment TitleFragment.kt package com.example.android.navigation import android.os.Bundle import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.databinding.DataBindingUtil import com.example.android.navigation.databinding.FragmentTitleBinding // TODO: Rename parameter arguments, choose names that match // the fragme..