AndroidManifest.xml
안드로이드 시스템이 앱의 코드를 실행하기 전에 확보해야 하는 앱에 대한 필수 정보를 시스템에 제공하는 목록
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapplication">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MyApplication">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
기본 설정
<?xml version="1.0" encoding="utf-8"?>
이 파일이 XML 문서임을 선언하는 문장
version은 XML의 버전을 의미하고 encoding은 이 파일에 적용되는 인코딩 방식이 무엇인지를 의미한다.
manifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.rp3_cong_baemin">
xmlns:android = "http//schemas.android.com/apk/res/android"
xmlns:android는 android라는 'namespace를 선언한다' 는 뜻이다.
여기서 namespace는 고유한 URI를 의미한다.
packge = "com.example.rp3_cong_baemin"
이 정보로 앱을 식별한다.
gradle 파일에 설정된 application Id의 값과 같다.
application
앱의 구성요소를 등록하기 위한 태그
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Rp3congbaemin">
<activity android:name=".SubActivity"></activity>
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
android:allowBackup = "true"
애플리케이션이 백업 및 복원 인프라에 참여하도록 허용할지 여부
이 속성을 false로 설정하면 모든 애플리케이션 데이터가 adb를 통해 저장되는 전체 시스템 백업에 의해서도 애플리케이션의 백업 또는 복원이 수행되지 않는다. 이 속성의 기본값은 true이다.
android:icon = "@mipmap/ic_launcher"
전체 애플리케이션의 아이콘 및 애플리케이션의 각 구성요소의 기본 아이콘
android:label = "@string/app_name"
전체 애플리케이션을 나타내는, 사용자가 읽을 수 있는 라벨 및 애플리케이션의 각 구성요소의 기본 라벨
android:roundIcon = "@mipmap/ic_launcher_round"
둥근 형태의 아이콘을 설정하는 속성
android:supportsRtl = "true"
애플리케이션이 오른쪽에서 왼쪽(RTL) 레이아웃을 지원하는지 여부를 선언한다.
android:theme = "@style/Theme.Rp3congbaemin">
애플리케이션의 모든 활동의 기본 테마를 정의하는 스타일 리소스의 참조
'Programming > Android' 카테고리의 다른 글
[Android] Relative Layout (0) | 2022.06.16 |
---|---|
[Android] Linear Layout (0) | 2022.06.15 |
[Android] Gradle Scripts (0) | 2022.06.15 |
[Android] 안드로이드 앱 크기단위 (0) | 2022.06.15 |
[Android] 네이티브앱, 하이브리드앱, 웹앱 (0) | 2019.06.04 |