|
@ -33,7 +33,6 @@ public class AboutActivity extends BaseActivity { |
|
|
super.onCreate(savedInstanceState); |
|
|
super.onCreate(savedInstanceState); |
|
|
setContentView(R.layout.activity_about); |
|
|
setContentView(R.layout.activity_about); |
|
|
String versionName = BuildConfig.VERSION_NAME; |
|
|
String versionName = BuildConfig.VERSION_NAME; |
|
|
String buildType = BuildConfig.BUILD_TYPE; |
|
|
|
|
|
|
|
|
|
|
|
//Initialize appbar
|
|
|
//Initialize appbar
|
|
|
appBar = findViewById(R.id.appbar); |
|
|
appBar = findViewById(R.id.appbar); |
|
@ -54,33 +53,33 @@ public class AboutActivity extends BaseActivity { |
|
|
trollGif = findViewById(R.id.trollPicFrame); |
|
|
trollGif = findViewById(R.id.trollPicFrame); |
|
|
|
|
|
|
|
|
TextView tv = findViewById(R.id.version); |
|
|
TextView tv = findViewById(R.id.version); |
|
|
if (tv != null) |
|
|
if (tv != null) { |
|
|
{ |
|
|
if (BuildConfig.DEBUG) |
|
|
if(buildType.equals("debug")) |
|
|
|
|
|
tv.setText(getString(R.string.version, versionName + "-debug")); |
|
|
tv.setText(getString(R.string.version, versionName + "-debug")); |
|
|
else |
|
|
else |
|
|
tv.setText(getString(R.string.version, versionName)); |
|
|
tv.setText(getString(R.string.version, versionName)); |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
tv.setOnClickListener(new View.OnClickListener() { |
|
|
|
|
|
@Override |
|
|
tv.setOnClickListener(new View.OnClickListener() { |
|
|
public void onClick(View view) { |
|
|
@Override |
|
|
if (mVersionLastPressedTime + TIME_INTERVAL > System.currentTimeMillis()) { |
|
|
public void onClick(View view) { |
|
|
if (mVersionPressedCounter == TIMES_TO_PRESS) { |
|
|
if (mVersionLastPressedTime + TIME_INTERVAL > System.currentTimeMillis()) { |
|
|
appBar.setVisibility(View.INVISIBLE); |
|
|
if (mVersionPressedCounter == TIMES_TO_PRESS) { |
|
|
mainContent.setVisibility(View.INVISIBLE); |
|
|
appBar.setVisibility(View.INVISIBLE); |
|
|
trollGif.setVisibility(View.VISIBLE); |
|
|
mainContent.setVisibility(View.INVISIBLE); |
|
|
drawer.getDrawerLayout().setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); |
|
|
trollGif.setVisibility(View.VISIBLE); |
|
|
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); |
|
|
drawer.getDrawerLayout().setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); |
|
|
|
|
|
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); |
|
|
|
|
|
} |
|
|
|
|
|
mVersionLastPressedTime = System.currentTimeMillis(); |
|
|
|
|
|
++mVersionPressedCounter; |
|
|
|
|
|
} else { |
|
|
|
|
|
mVersionLastPressedTime = System.currentTimeMillis(); |
|
|
|
|
|
mVersionPressedCounter = 0; |
|
|
} |
|
|
} |
|
|
mVersionLastPressedTime = System.currentTimeMillis(); |
|
|
|
|
|
++mVersionPressedCounter; |
|
|
|
|
|
} else { |
|
|
|
|
|
mVersionLastPressedTime = System.currentTimeMillis(); |
|
|
|
|
|
mVersionPressedCounter = 0; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -101,7 +100,8 @@ public class AboutActivity extends BaseActivity { |
|
|
.setView(webView) |
|
|
.setView(webView) |
|
|
.setPositiveButton(android.R.string.ok, null) |
|
|
.setPositiveButton(android.R.string.ok, null) |
|
|
.show(); |
|
|
.show(); |
|
|
alertDialog.getWindow().setLayout(width, height); |
|
|
if(alertDialog.getWindow()!=null) |
|
|
|
|
|
alertDialog.getWindow().setLayout(width, height); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void displayMITLibraries(View v) { |
|
|
public void displayMITLibraries(View v) { |
|
@ -115,7 +115,8 @@ public class AboutActivity extends BaseActivity { |
|
|
.setView(webView) |
|
|
.setView(webView) |
|
|
.setPositiveButton(android.R.string.ok, null) |
|
|
.setPositiveButton(android.R.string.ok, null) |
|
|
.show(); |
|
|
.show(); |
|
|
alertDialog.getWindow().setLayout(width, height); |
|
|
if(alertDialog.getWindow()!=null) |
|
|
|
|
|
alertDialog.getWindow().setLayout(width, height); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|