package com.averi.worldscribe.activities;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.widget.Spinner;

import com.averi.worldscribe.R;
import com.averi.worldscribe.adapters.AppThemeArrayAdapter;

public class SettingsActivity extends AppCompatActivity {

    private Spinner appThemeSpinner;

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

        appThemeSpinner = (Spinner) findViewById(R.id.themeSelector);

        setAppBar();
        populateAppThemeSpinner();
    }

    /**
     * Setup this Activity's app bar.
     */
    private void setAppBar() {
        Toolbar myToolbar = (Toolbar) findViewById(R.id.my_toolbar);
        assert myToolbar != null;
        myToolbar.setTitle(R.string.settingsTitle);
        setSupportActionBar(myToolbar);
    }

    /**
     * Populate the App Theme spinner with all available app themes.
     */
    private void populateAppThemeSpinner() {
        Integer allThemes[] = {R.style.AppTheme, R.style.SunsetOrange, R.style.EnchantedGreen,
            R.style.UbePurple, R.style.LovelyRed};
        AppThemeArrayAdapter adapter = new AppThemeArrayAdapter(this, allThemes);
        appThemeSpinner.setAdapter(adapter);
    }

}

@@ -153,16 +153,42 @@
 oolbar;%0A
+import android.view.Menu;%0A
 import a
@@ -695,32 +695,217 @@
 inner();%0A    %7D%0A%0A
+    @Override%0A    public boolean onCreateOptionsMenu(Menu menu) %7B%0A        getMenuInflater().inflate(R.menu.save_edit_menu, menu);%0A        return super.onCreateOptionsMenu(menu);%0A    %7D%0A%0A
     /**%0A     * S

Add SAVE item to SettingsActivity app bar