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 {
|
public class SplashActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private ActivitySplashBinding binding;
|
private ActivitySplashBinding binding;
|
||||||
private static final long TOTAL_TIME = 1000;
|
private static final long TOTAL_TIME = 3000;
|
||||||
private CountDownTimer countDownTimer;
|
private CountDownTimer countDownTimer;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -40,11 +40,11 @@ public class SplashActivity extends AppCompatActivity {
|
|||||||
.transform(new RoundedCorners(16))
|
.transform(new RoundedCorners(16))
|
||||||
.into(binding.image);
|
.into(binding.image);
|
||||||
|
|
||||||
countDownTimer = new CountDownTimer(TOTAL_TIME, 1000) {
|
countDownTimer = new CountDownTimer(TOTAL_TIME, 100) {
|
||||||
@Override
|
@Override
|
||||||
public void onTick(long millisUntilFinished) {
|
public void onTick(long millisUntilFinished) {
|
||||||
int progress = (int) (millisUntilFinished / 1000);
|
int percentage = (int) (100 - (float) millisUntilFinished / TOTAL_TIME * 100);
|
||||||
binding.progress.setProgress(progress);
|
binding.progress.setProgress(percentage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user