easy-android-splash-screen
getinthere님의블로그 : 네이버 블로그
implementation 'gr.pantrif:easy-android-splash-screen:0.0.1'
package com.cos.bottomex01;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import gr.net.maroulis.library.EasySplashScreen;
public class SplashScreenActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// 내 앱에 필요한 자원들을 다운로드 - 사진, 데이터
// 몇 초가 걸릴지 모름
// new Thread (()-> {
// // 다운로드 (Retrofit)
// }).start();
View easySplashScreenView = new EasySplashScreen(SplashScreenActivity.this)
.withFullScreen()
.withTargetActivity(MainActivity.class)
.withSplashTimeOut(4000)
.withBackgroundResource(android.R.color.holo_red_light)
.withHeaderText("Header")
.withFooterText("Copyright 2016")
.withBeforeLogoText("My cool company")
.withLogo(R.drawable.ic_launcher_background)
.withAfterLogoText("Some more details")
.create();
setContentView(easySplashScreenView);
}
}
gradle.properties
#android.enableJetifier=true
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="<http://schemas.android.com/apk/res/android>"
package="com.cos.bottomex01">
<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.BottomEx01">
<activity android:name=".MainActivity"></activity>
<activity android:name=".SplashScreenActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>