Android Kotlin : 타이틀 바, 상태 바 없애기

2022. 3. 14. 23:59[Android APP] feat. Kotlin/Kotlin 공부

개요

프로젝트를 생성하고 AVD에서 앱을 돌려보면 상단에 기본적으로 타이틀바와 상태바가 나타나게 된다.

그게 거추장스럽다고 느낀다면 없앨 수 있는 방법이 있다.

 

본문

1. 첫 번째 방법

res -> values -> themes -> themes.xml에 아래 코드를 추가해주면 깔끔하게 사라진다.

<item name="windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>

 

2. 두 번째 방법

manifast.xml에 아래 코드를 추가해준다.

android:theme="@style/Theme.MaterialComponents.DayNight.NoActionBar"
반응형