Updated on 2026-08-14
This commit is contained in:
parent
ebd194dcc8
commit
c64fb378ea
5 changed files with 35 additions and 18 deletions
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
|
|
@ -2,6 +2,26 @@ apply plugin: 'com.android.application'
|
|||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
//ext {
|
||||
// git = org.ajoberstar.grgit.Grgit.open()
|
||||
// gitVersionCode = git.tag.list().size()
|
||||
// gitVersionName = "${git.describe()}"
|
||||
//}
|
||||
|
||||
def getVersionCode = { ->
|
||||
try {
|
||||
def code = new ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine 'git', 'tag', '--list'
|
||||
standardOutput = code
|
||||
}
|
||||
return code.toString().split("\n").size()
|
||||
}
|
||||
catch (ignored) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 27
|
||||
defaultConfig {
|
||||
|
|
@ -9,7 +29,7 @@ android {
|
|||
minSdkVersion 21
|
||||
targetSdkVersion 27
|
||||
versionCode 26
|
||||
versionName "0.85.5.831"
|
||||
versionName "0.85.5.831 " + getVersionCode
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,12 +17,10 @@ import com.tangem.wallet.R;
|
|||
public class LogoActivity extends AppCompatActivity {
|
||||
public static final String TAG = LogoActivity.class.getSimpleName();
|
||||
|
||||
private final Runnable mHideRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
hide();
|
||||
}
|
||||
};
|
||||
public static final String EXTRA_AUTO_HIDE = "extra_auto_hide";
|
||||
public static final int MILLIS_AUTO_HIDE = 1000;
|
||||
|
||||
private final Runnable mHideRunnable = this::hide;
|
||||
|
||||
private ImageView imgLogo;
|
||||
|
||||
|
|
@ -50,9 +48,9 @@ public class LogoActivity extends AppCompatActivity {
|
|||
else
|
||||
AppVersion.setText("BETA v." + BuildConfig.VERSION_NAME);
|
||||
|
||||
if (!getIntent().getBooleanExtra("skipAutoHide", false)) {
|
||||
delayedHide(1000);
|
||||
}
|
||||
|
||||
if (getIntent().getBooleanExtra(EXTRA_AUTO_HIDE, true))
|
||||
delayedHide();
|
||||
}
|
||||
|
||||
private void hide() {
|
||||
|
|
@ -61,12 +59,9 @@ public class LogoActivity extends AppCompatActivity {
|
|||
finish();
|
||||
}
|
||||
|
||||
/**
|
||||
* Schedules a call to hide() in [delay] milliseconds, canceling any
|
||||
* previously scheduled calls.
|
||||
*/
|
||||
private void delayedHide(int delayMillis) {
|
||||
private void delayedHide() {
|
||||
// imgLogo.removeCallbacks(mHideRunnable);
|
||||
imgLogo.postDelayed(mHideRunnable, delayMillis);
|
||||
imgLogo.postDelayed(mHideRunnable, MILLIS_AUTO_HIDE);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -332,6 +332,7 @@ public class MainActivity extends AppCompatActivity implements PopupMenu.OnMenuI
|
|||
private void showLogoActivity() {
|
||||
Intent intent = new Intent(getBaseContext(), LogoActivity.class);
|
||||
intent.putExtra(LogoActivity.TAG, true);
|
||||
intent.putExtra(LogoActivity.EXTRA_AUTO_HIDE, false);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
buildscript {
|
||||
|
||||
ext.kotlin_version = '1.2.41'
|
||||
repositories {
|
||||
google()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue