Notice
Recent Posts
Recent Comments
Link
250x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Dialog
- Compose
- LifeCycle
- 앱
- activity
- 테스트
- Coroutines
- intent
- ScrollView
- android
- DART
- 계측
- scroll
- viewmodel
- binding
- Flutter
- tabbar
- 앱바
- data
- Navigation
- textfield
- drift
- textview
- TEST
- 안드로이드
- Button
- CustomScrollView
- Kotlin
- appbar
- livedata
Archives
- Today
- Total
Study Record
[안드로이드] Application Class 본문
728x90
😶 Appliation Class 개요
앱 전역의 상태를 포함하는 기본 클래스로 운영체제가 앱과 상호작용하기 위해 사용하는 주요 객체이다. 앱 전역의 상태를 포함하므로 전역 변수를 선언하면 앱 어디서든 접근할 수 있다.
Application() 을 상속받는 클래스를 만든다.
import android.app.Application
class TestApplication : Application() {
override fun onCreate() {
super.onCreate()
}
}
매니패스트 파일의 <application> 태그의 android:name 속성에 클래스를 추가해준다.
<?xml version="1.0" encoding="utf-8"?><!--
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.dessertclicker">
<application
android:name=".TestApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_dessert_test"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_dessert_test_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
...
</application>
</manifest>
728x90
'안드로이드' 카테고리의 다른 글
[안드로이드] 강제 종료 시나리오 테스트 - onSaveInstanceState() (0) | 2023.06.29 |
---|---|
[안드로이드] Activity 라이프사이클(lifeCycle) 살펴보기 (0) | 2023.06.29 |
[안드로이드] 암시적 인텐트(implicit intent) 사용해보기 (0) | 2023.06.27 |
[안드로이드] Intent 살펴보기 (0) | 2023.06.27 |
[안드로이드] Navigation 을 이용한 Fragment 데이터 전달, Safe Arg (0) | 2023.06.27 |