Permalink
Browse files

Change HashMap to SparseArray for navigation titles mapping

  • Loading branch information...
chrisk44 committed Mar 25, 2018
1 parent 85c81ec commit fa04b7ac6f4c3248156cbb03a2cdf73e9141859e
Showing with 2 additions and 1 deletion.
  1. +2 −1 app/src/main/java/com/hijacker/MainActivity.java
@@ -54,6 +54,7 @@
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.util.SparseArray;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.Menu;
@@ -126,7 +127,7 @@
static View rootView;
static DrawerLayout mDrawerLayout;
static NavigationView navigationView;
static HashMap<Integer, String> navTitlesMap = new HashMap<>(); //HashMap to map fragment IDs to their respective navigation titles
static SparseArray<String> navTitlesMap = new SparseArray<>(); //SparseArray to map fragment IDs to their respective navigation titles
static Drawable overflow[] = {null, null, null, null, null, null, null, null}; //Drawables to use for overflow button icon
static ImageView status[] = {null, null, null, null, null}; //Icons in TestDialog, set in TestDialog class
static int progress_int;

0 comments on commit fa04b7a

Please sign in to comment.