/****************************************************************************** * OpenLP - Open Source Lyrics Projection * * --------------------------------------------------------------------------- * * Copyright (c) 2011-2014 Raoul Snyman * * Portions copyright (c) 2011-2014 Tim Bentley, Johan Mynhardt * * * * --------------------------------------------------------------------------- * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the Free * * Software Foundation; version 2 of the License. * * * * 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 General Public License for * * more details. * * * * You should have received a copy of the GNU General Public License along * * with this program; if not, write to the Free Software Foundation, Inc., 59 * * Temple Place, Suite 330, Boston, MA 02111-1307 USA * *******************************************************************************/ package org.openlp.android2.activities; import android.os.Bundle; import android.preference.PreferenceActivity; import android.preference.PreferenceFragment; import org.openlp.android2.R; public class SettingsActivity extends PreferenceActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getFragmentManager().beginTransaction() .replace(android.R.id.content, new SettingsFragment()) .commit(); } public static class SettingsFragment extends PreferenceFragment { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Load the preferences from an XML resource addPreferencesFromResource(R.xml.pref_general); } } }