package com.marverenic.music.ui.settings;

import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.MenuItem;

import com.marverenic.music.R;
import com.marverenic.music.ui.BaseActivity;

public class SettingsActivity extends BaseActivity {

    public static Intent newIntent(Context context) {
        return new Intent(context, SettingsActivity.class);
    }

    @Override
    public void onCreate(final Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_settings);

        if (getSupportActionBar() != null
                && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            getSupportActionBar()
                    .setElevation(getResources().getDimension(R.dimen.header_elevation));
        }

        if (savedInstanceState == null) {
            getSupportFragmentManager().beginTransaction()
                    .replace(R.id.pref_fragment_container, new PreferenceFragment())
                    .commit();
        }
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case android.R.id.home:
                if (!getSupportFragmentManager().popBackStackImmediate()) {
                    super.onOptionsItemSelected(item);
                }
                return true;
            default:
                return super.onOptionsItemSelected(item);
        }
    }

    @Override
    public void onBackPressed() {
        if (!getSupportFragmentManager().popBackStackImmediate()) {
            super.onBackPressed();
        }
    }
}

@@ -169,21 +169,32 @@
 oid.
-view.MenuItem
+support.v7.app.ActionBar
 ;%0A%0Ai
@@ -627,58 +627,259 @@
     
-if (getSupportActionBar() != null%0A        
+setSupportActionBar(findViewById(R.id.toolbar));%0A        ActionBar toolbar = getSupportActionBar();%0A        toolbar.setDisplayShowHomeEnabled(true);%0A        toolbar.setDisplayHomeAsUpEnabled(true);%0A        toolbar.setHomeButtonEnabled(true);%0A%0A
         
 && B
@@ -878,11 +878,12 @@
     
-&& 
+if (
 Buil
@@ -951,50 +951,15 @@
     
-getSupportActionBar()%0A                    
+toolbar
 .set
@@ -1308,125 +1308,30 @@
 n on
-OptionsItemSelected(MenuItem item) %7B%0A        switch (item.getItemId()) %7B%0A            case android.R.id.home:%0A        
+SupportNavigateUp() %7B%0A
     
@@ -1410,48 +1410,15 @@
     
-        super.onOptionsItemSelected(item
+finish(
 );%0A 
@@ -1428,28 +1428,18 @@
     
-  
-      %7D%0A  
+%7D%0A
         
     
@@ -1430,30 +1430,24 @@
   %7D%0A        
-      
 return true;
@@ -1451,97 +1451,8 @@
 ue;%0A
-            default:%0A                return super.onOptionsItemSelected(item);%0A        %7D%0A
     

Fix missing up button on settings page