Skip to content

Commit

Permalink
fixed all linting errors in MainActivity.java
Browse files Browse the repository at this point in the history
Added "ClickableViewAccessibility" to SuppressWarnings on onCreate Method
removed variable DEF_FULLSCREEN and changed default value for isFullScreen to true
  • Loading branch information
Lekky71 committed Dec 10, 2018
1 parent 6a790ad commit b6334dd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/src/main/java/com/uberspot/a2048/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ public class MainActivity extends Activity {
private long mLastBackPress;
private static final long mBackPressThreshold = 3500;
private static final String IS_FULLSCREEN_PREF = "is_fullscreen_pref";
private static boolean DEF_FULLSCREEN = true;
private long mLastTouch;
private static final long mTouchThreshold = 2000;
private Toast pressBackToast;

@SuppressLint({"SetJavaScriptEnabled", "NewApi", "ShowToast"})
@SuppressLint({"SetJavaScriptEnabled", "NewApi", "ShowToast", "ClickableViewAccessibility"})
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand Down Expand Up @@ -133,7 +132,7 @@ protected void onSaveInstanceState(Bundle outState) {
/**
* Saves the full screen setting in the SharedPreferences
*
* @param isFullScreen
* @param isFullScreen boolean value
*/

private void saveFullScreen(boolean isFullScreen) {
Expand All @@ -145,13 +144,13 @@ private void saveFullScreen(boolean isFullScreen) {

private boolean isFullScreen() {
return PreferenceManager.getDefaultSharedPreferences(this).getBoolean(IS_FULLSCREEN_PREF,
DEF_FULLSCREEN);
true);
}

/**
* Toggles the activity's fullscreen mode by setting the corresponding window flag
*
* @param isFullScreen
* @param isFullScreen boolean value
*/
private void applyFullScreen(boolean isFullScreen) {
if (isFullScreen) {
Expand Down

0 comments on commit b6334dd

Please sign in to comment.