/*
* OpenERP, Open Source Management Solution
* Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
package com.openerp;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.view.MenuItem;
/**
* The Class AppSettingsActivity.
*/
public class AppSettingsActivity extends PreferenceActivity {
public static final String ACTION_ACCOUNT_CONFIG = "com.openerp.ACTION_ACCOUNT_CONFIG";
/*
* (non-Javadoc)
*
* @see android.preference.PreferenceActivity#onCreate(android.os.Bundle)
*/
@SuppressWarnings("deprecation")
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getActionBar().setHomeButtonEnabled(true);
getActionBar().setSubtitle("Application Settings");
getActionBar().setDisplayHomeAsUpEnabled(true);
getActionBar().setIcon(R.drawable.ic_action_settings);
addPreferencesFromResource(R.xml.account_preferences);
}
/*
* (non-Javadoc)
*
* @see android.app.Activity#onOptionsItemSelected(android.view.MenuItem)
*/
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// app icon in action bar clicked; go home
finish();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
}