Updated on 2026-08-14

This commit is contained in:
Tangem 2018-06-04 12:10:37 +03:00
parent ebd194dcc8
commit c64fb378ea
5 changed files with 35 additions and 18 deletions

View file

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

View file

@ -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) {
//imgLogo.removeCallbacks(mHideRunnable);
imgLogo.postDelayed(mHideRunnable, delayMillis);
private void delayedHide() {
// imgLogo.removeCallbacks(mHideRunnable);
imgLogo.postDelayed(mHideRunnable, MILLIS_AUTO_HIDE);
}
}
}

View file

@ -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);
}