티스토리 뷰
SplashActivity (로딩화면) 만들기
: 로딩화면을 만들어보는 실습
SplashActivity 만들기
레이아웃을 Empty로 하여 새로운 Activitiy를 생성한다.
AndroidManifest.xml 수정하기
기존에 AndroidManifest.xml 에는 아래와 같이 되어있다.
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
MainActivity에 있던 intent-filter를 SplashActivity 쪽으로 옮긴다.
그리고 SplashActivity의 테마를 NoActionBar로 설정한다.
결과적으로 AndroidManifest.xml 은
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
</activity>
<activity android:name=".SplashActivity" android:theme="@style/Theme.AppCompat.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
이와 같이 된다.
그럼 어플실행시 SplashActivity 가 먼저 실행되고 MainActivity가 실행된다.
'Android' 카테고리의 다른 글
[Android] Android 와 Spring 연동 (2) | 2016.08.12 |
---|---|
[Android] 비콘(Beacon) (2) | 2016.08.11 |
[Android] Jsoup 으로 HTML 파싱하기 (7) | 2016.08.09 |
[Android] 페이스북 타임라인에 포스팅하기, 글 검색하기 (0) | 2016.08.08 |
[Android] 페이스북 글 가져오기 (3) | 2016.08.07 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- Spring
- mybatis
- boj
- DP
- 안드로이드 스튜디오
- servlet
- jsp
- restfb
- 안드로이드 비콘
- indexOf
- RequestMapping
- controller
- list
- Baekjoon Online Judege
- order by
- BFS
- AlertDialog.Builder
- INSERT
- REDIRECT
- onBackPressed
- 자바
- 예외처리
- sort
- 이클립스
- DFS
- maven
- onPostExecute
- java
- algorithm
- table
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |
글 보관함