Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- View
- 알림
- kotlin
- Behavior
- onLayout
- recyclerview
- Navigation
- sqlite
- onMeasure
- 백준
- HTTP
- BOJ
- Android
- CollapsingToolbarLayout
- LiveData
- DataBinding
- ViewModel
- activity
- 알고리즘
- hilt
- 코틀린
- Algorithm
- room
- CoordinatorLayout
- lifecycle
- Coroutine
- notification
- AppBarLayout
- 안드로이드
- CustomView
Archives
- Today
- Total
목록allowMainThreadQueries (1)
개발일지
Android in A..Z - Room (allowMainThreadQueries)
allowMainThreadQueries Room에서 기본적으로 Main Thread에서 접근할 수 없지만, allowMainThreadQueries를 사용하여 만든 Instance에서는 Main Thread에서도 접근할 수 있다. => Database를 접근하는 작업은 무거운 작업이고 UI를 오랫동안 잠글 수 있기 Main Thread에서 접근하는 것은 좋지 않다. AppDatabase package com.taetae98.room.singleton import android.content.Context import androidx.room.CoroutinesRoom import androidx.room.Database import androidx.room.Room import androidx.room..
Android (안드로이드)/Room
2021. 1. 17. 03:25