V1.0.0(1)完成版

This commit is contained in:
lihongwei 2025-02-17 10:55:57 +08:00
parent adecc862e9
commit d5745bc6dc
2 changed files with 4 additions and 4 deletions

BIN
app/HappyPrankSounds.jks Normal file

Binary file not shown.

View File

@ -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