본문 바로가기

> Android13

[Android] Gradle, Android JetPack, Androidx discrete : 별개의 functionality : 기능, 목적 gradle은 default로 Module: app 을 가진다. 하지만 더 큰 application을 만든다면 많은 app module을 가질 것이고, 아래 사진처럼 기능을 나눌 수 있다. 또는 라이브러리를 사용하거나 Android wear을 지원할 수도 있다. In build.gradle(project) In build.gradle(app) compileSdkVersion : 실제로 app이 compile시 사용하는 버전 targetSdkVersion : compile시 영향을 주지 않음. 하지만 test시 관련 있음? (minSdkVersion 부터 targetSdkVersion까지 test가 가능), 일반적으로, compilSdkV.. 2020. 9. 20.
[Android] Namespace in XML file tools : The tools namespace is used when you want to find dummy content that is only used when you're previewing the app in the preview pane. Attribute using the tools data space are removed when you actually compile the app. tools는 preview에서 먼저 보고 싶은 내용물들이 보여지도록 도와준다. 하지만 컴파일되는 순간 tools 관련 항목들은 제거된다. 단지 preview에서 dummy content 를 확인하기 위한 용도 namespace는 같은 이름을 가진 속성(attribute)을 구분하여 서로 다른 기능을 수행하도.. 2020. 9. 20.
[Android] sp, dp sp = Scale Indepent Pixel (this is like the DP unit but it is not only scaled by the pixel density but also by the font size preference that user can set in the phone settings) -> 사용자가 설정한 글씨 크기에 따라 크기가 달라짐 (scale : 크기를 변경[조정]하다)(scalable하다) -> 쉽게, 24sp는 워드프로세서에서 24 point font를 설정한 것과 같다. -> margin, padding에 사용하지 않는 게 좋다. dp = Density Independent Pixel (this is the unit for expressing location a.. 2020. 9. 20.
[Android] Room을 사용하여 로컬 데이터베이스에 데이터 저장 다른 개발자의 ToDo List App 을 공부하던 중, RoomDatabase를 발견, 사용법이 궁금해져서 구글링해봤다. https://developer.android.com/training/data-storage/room?hl=ko 포인트!! - 구글은 "SQLite 대신 Room을 사용하는 것이 좋습니다" 라고 말한다. -참고 : 앱에서 Room을 사용하려면 앱의 build.gradle파일에서 Room 종속성을 선언하면 됩니다. 그러나 사용하려면 종속성부터 해결하자! https://developer.android.com/jetpack/androidx/releases/room?hl=ko#declaring_dependencies 2020. 9. 19.