Turn splash screen duration into a resource variable

so screenshot tests can define a different duration
This commit is contained in:
Torsten Grote
2021-03-19 14:27:10 -03:00
parent 4ca286b28e
commit dcd37f71d1
3 changed files with 11 additions and 1 deletions

View File

@@ -61,6 +61,8 @@ public class SplashScreenActivity extends BaseActivity {
startNextActivity(ENTRY_ACTIVITY);
finish();
} else {
int duration =
getResources().getInteger(R.integer.splashScreenDuration);
new Handler().postDelayed(() -> {
if (currentTimeMillis() >= EXPIRY_DATE) {
LOG.info("Expired");
@@ -69,7 +71,7 @@ public class SplashScreenActivity extends BaseActivity {
startNextActivity(ENTRY_ACTIVITY);
}
supportFinishAfterTransition();
}, 500);
}, duration);
}
}

View File

@@ -3,6 +3,8 @@
<integer name="animationSpeed">@android:integer/config_mediumAnimTime</integer>
<integer name="splashScreenDuration">500</integer>
<declare-styleable name="BriarRecyclerView">
<attr name="scrollToEnd" format="boolean" />
<attr name="emptyImage" format="integer" />

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="splashScreenDuration">7500</integer>
</resources>