-
안드로이드 | 타이틀 바 없애기, 풀스크린Android Studio 2018. 5. 12. 23:28
요즘 안드로이드 공부에 한창 물이 오른 저의 궁금증을 해결해보려합니다 :-)
먼저는 타이틀바!! 매번 프로젝트 이름을 날짜로 짓는데...
계속보이는게 눈에 거슬리더라구요ㅠㅠㅠㅠ
그래서 공부해왔습니다!!
Manifest.xml 파일에 들어가면
<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/AppTheme">
<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:theme="@style/AppTheme" 이라는 부분이 답이에요 ㅎㅎ
Ctrl 을 누른 상태로 style/AppTheme 을 누르게되면
style.xml 이 열립니다.
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="windowNoTitle">true</item> <!-- 타이틀바 제거 -->
<item name="android:windowFullscreen">true</item> <!-- 풀스크린 -->
</style>
</resources>쨘!!! 저기 아래서 4번째줄에 있는 문장을 복붙해서 넣으면 타이틀바가 제거되요 ㅎㅎ
풀스크린을 원하시는분들은 아래서 3번째 줄 문장을 복붙하시면 됩니다 ㅎㅎ
그리고 XML 주석은 꼭 모든 괄호가 다 닫힌 뒤에 써야한대요!
안그러면 그것도 수식으로 읽어서 오류가 나더라구요 ㅠㅠㅠㅠ
xml도 잘 몰라서,, 한참을 헤맨 .................
다들 짜요!
'Android Studio' 카테고리의 다른 글
Android) 뒤로가기 아이콘 생성 (0) 2020.04.14 안드로이드 | 카카오 API 해시 값 얻어오기 (0) 2018.05.10