- super.onCreate(savedInstanceState);
- setContentView(R.layout.guide_coordinatorlayout);
-
- // We need to use `SupportActionBar` from `android.support.v7.app.ActionBar` until the minimum API is >= 21.
- Toolbar guideAppBar = (Toolbar) findViewById(R.id.guide_toolbar);
- setSupportActionBar(guideAppBar);
-
- // Display the home arrow on `ppBar`.
- final ActionBar appBar = getSupportActionBar();
- assert appBar != null; // This assert removes the incorrect lint warning in Android Studio on the following line that `appBar` might be `null`.
- appBar.setDisplayHomeAsUpEnabled(true);
+ // Get a handle for the shared preferences.
+ SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);