Skip to content

Commit

Permalink
handle config changes
Browse files Browse the repository at this point in the history
  • Loading branch information
uberspot committed Mar 31, 2014
1 parent ba02bb5 commit 6f21f04
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<activity
android:name="com.uberspot.a2048.MainActivity"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
7 changes: 7 additions & 0 deletions src/com/uberspot/a2048/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.view.Menu;
import android.view.MotionEvent;
import android.view.View;
Expand Down Expand Up @@ -113,6 +114,12 @@ private void applyFullScreen(boolean isFullScreen) {
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
}

@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
}

@Override
public void onBackPressed() {
long currentTime = System.currentTimeMillis();
Expand Down

0 comments on commit 6f21f04

Please sign in to comment.