안드로이드
[안드로이드]앱 시작할 때 검은화면, 하얀화면 없애기(인트로 이미지 빠르게 띄우기)
개발자윌슨
2019. 3. 14. 18:31
안드로이드 앱을 실행 할 때 하얀 화면이나 검은 화면이 먼저 뜨고 1초 정도 후에 앱이 실행되는걸 볼 수 있다.
인트로 화면(스플래시)이 있을 경우는 인트로 이미지가 좀 늦게 뜰 때가 있다.
처음에 잠깐 나오는 화면을 제거 해서 더 빠르게 앱이 실행되도록 해보자.
1 2 3 4 5 6 7 8 9 | <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="android:windowContentOverlay">@null</item> <item name="android:windowIsTranslucent">true</item> </style> | cs |
방법은 의외로 간단하다.
style.xml에서 android:windowContentOverlay, android:windowIsTranslucent 두가지 아이템을 추가하면 된다.