V1.0.0(1)完成版
This commit is contained in:
parent
adecc862e9
commit
d5745bc6dc
BIN
app/HappyPrankSounds.jks
Normal file
BIN
app/HappyPrankSounds.jks
Normal file
Binary file not shown.
@ -18,7 +18,7 @@ import com.prank.happypranksounds.databinding.ActivitySplashBinding;
|
||||
public class SplashActivity extends AppCompatActivity {
|
||||
|
||||
private ActivitySplashBinding binding;
|
||||
private static final long TOTAL_TIME = 1000;
|
||||
private static final long TOTAL_TIME = 3000;
|
||||
private CountDownTimer countDownTimer;
|
||||
|
||||
@Override
|
||||
@ -40,11 +40,11 @@ public class SplashActivity extends AppCompatActivity {
|
||||
.transform(new RoundedCorners(16))
|
||||
.into(binding.image);
|
||||
|
||||
countDownTimer = new CountDownTimer(TOTAL_TIME, 1000) {
|
||||
countDownTimer = new CountDownTimer(TOTAL_TIME, 100) {
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
int progress = (int) (millisUntilFinished / 1000);
|
||||
binding.progress.setProgress(progress);
|
||||
int percentage = (int) (100 - (float) millisUntilFinished / TOTAL_TIME * 100);
|
||||
binding.progress.setProgress(percentage);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
Reference in New Issue
Block a user