| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| |
| package io.v.android.apps.namespace_browser; |
| |
| import android.app.ActionBar; |
| import android.os.Bundle; |
| import android.preference.PreferenceActivity; |
| import android.view.MenuItem; |
| |
| public class SettingsActivity extends PreferenceActivity { |
| @Override |
| protected void onCreate(Bundle savedInstanceState) { |
| super.onCreate(savedInstanceState); |
| addPreferencesFromResource(R.xml.preferences); |
| |
| ActionBar actionBar = getActionBar(); |
| actionBar.setDisplayHomeAsUpEnabled(true); |
| } |
| |
| @Override |
| public boolean onOptionsItemSelected(MenuItem item) { |
| switch (item.getItemId()) { |
| // Respond to the action bar's Up/Home button. We handle this button |
| // just like the back button, across all activities. |
| case android.R.id.home: |
| onBackPressed(); |
| return true; |
| } |
| return false; |
| } |
| } |