SplashScreenActivity

Ruinak·2021년 8월 6일
0

Bigdata Lesson

목록 보기
7/18

SplashScreenActivity

package com.com.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);

        // withSplashTimeOut 동안 내 앱에 필요한 자원들을 다운로드해야 함 - 사진, 데이터
        // 1초, 3초
        new Thread(() -> {
            // 다운로드(Retrofit2를 사용하면 편함)
        }).start();

        View easySplashScreenView = new EasySplashScreen(SplashScreenActivity.this)
                .withFullScreen()
                .withTargetActivity(MainActivity.class)
                .withSplashTimeOut(1000)
                .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);
    }
}

properties

android.enableJetifier=true

profile
Nil Desperandum <절대 절망하지 마라>

0개의 댓글

관련 채용 정보