Browse Source

Small AboutActivity layout fix

develop
Ezerous 3 years ago
parent
commit
f12c6ea706
  1. 10
      app/src/main/java/gr/thmmy/mthmmy/activities/AboutActivity.java

10
app/src/main/java/gr/thmmy/mthmmy/activities/AboutActivity.java

@ -133,7 +133,7 @@ public class AboutActivity extends BaseActivity {
@Override @Override
public void onBackPressed() { public void onBackPressed() {
if (easterEggImage.getVisibility() == View.INVISIBLE) if (easterEggImage.getVisibility() == View.GONE)
super.onBackPressed(); super.onBackPressed();
else else
hideEasterEgg(); hideEasterEgg();
@ -184,9 +184,9 @@ public class AboutActivity extends BaseActivity {
@SuppressLint("SourceLockedOrientationActivity") @SuppressLint("SourceLockedOrientationActivity")
private void showEasterEgg() { private void showEasterEgg() {
if (getResources().getConfiguration().orientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) { if (getResources().getConfiguration().orientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); //TODO: why? setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
appBar.setVisibility(View.INVISIBLE); appBar.setVisibility(View.GONE);
mainContent.setVisibility(View.INVISIBLE); mainContent.setVisibility(View.GONE);
easterEggImage.setVisibility(View.VISIBLE); easterEggImage.setVisibility(View.VISIBLE);
drawer.getDrawerLayout().setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); drawer.getDrawerLayout().setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
} }
@ -195,7 +195,7 @@ public class AboutActivity extends BaseActivity {
private void hideEasterEgg() { private void hideEasterEgg() {
appBar.setVisibility(View.VISIBLE); appBar.setVisibility(View.VISIBLE);
mainContent.setVisibility(View.VISIBLE); mainContent.setVisibility(View.VISIBLE);
easterEggImage.setVisibility(View.INVISIBLE); easterEggImage.setVisibility(View.GONE);
drawer.getDrawerLayout().setDrawerLockMode(DrawerLayout.LOCK_MODE_UNDEFINED); drawer.getDrawerLayout().setDrawerLockMode(DrawerLayout.LOCK_MODE_UNDEFINED);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
} }

Loading…
Cancel
Save