mirror of https://github.com/kurisufriend/Clover
parent
7464687bec
commit
d6111578f9
@ -0,0 +1,51 @@ |
|||||||
|
/* |
||||||
|
* Clover - 4chan browser https://github.com/Floens/Clover/
|
||||||
|
* Copyright (C) 2014 Floens |
||||||
|
* |
||||||
|
* 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, 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 General Public License for more details. |
||||||
|
* |
||||||
|
* You should have received a copy of the GNU General Public License |
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/ |
||||||
|
package org.floens.chan.ui.activity; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
import android.preference.Preference; |
||||||
|
import android.preference.PreferenceActivity; |
||||||
|
import android.preference.PreferenceFragment; |
||||||
|
|
||||||
|
import org.floens.chan.R; |
||||||
|
|
||||||
|
public class AdvancedSettingsActivity extends PreferenceActivity { |
||||||
|
@Override |
||||||
|
protected void onCreate(final Bundle savedInstanceState) { |
||||||
|
super.onCreate(savedInstanceState); |
||||||
|
|
||||||
|
getFragmentManager().beginTransaction().replace(android.R.id.content, new AdvancedSettingsFragment()).commit(); |
||||||
|
} |
||||||
|
|
||||||
|
public static class AdvancedSettingsFragment extends PreferenceFragment { |
||||||
|
@Override |
||||||
|
public void onCreate(Bundle savedInstanceState) { |
||||||
|
super.onCreate(savedInstanceState); |
||||||
|
|
||||||
|
addPreferencesFromResource(R.xml.preference_advanced); |
||||||
|
|
||||||
|
findPreference("preference_force_phone_layout").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { |
||||||
|
@Override |
||||||
|
public boolean onPreferenceChange(final Preference preference, final Object newValue) { |
||||||
|
BaseActivity.doRestartOnResume = true; |
||||||
|
return true; |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<!-- |
||||||
|
Clover - 4chan browser https://github.com/Floens/Clover/ |
||||||
|
Copyright (C) 2014 Floens |
||||||
|
|
||||||
|
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, 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 General Public License for more details. |
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License |
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||||
|
--> |
||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"> |
||||||
|
<item |
||||||
|
android:id="@+id/action_settings_advanced" |
||||||
|
android:orderInCategory="1" |
||||||
|
android:showAsAction="never" |
||||||
|
android:title="@string/action_settings_advanced"/> |
||||||
|
</menu> |
@ -0,0 +1,25 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<!-- |
||||||
|
Clover - 4chan browser https://github.com/Floens/Clover/ |
||||||
|
Copyright (C) 2014 Floens |
||||||
|
|
||||||
|
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, 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 General Public License for more details. |
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License |
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||||
|
--> |
||||||
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> |
||||||
|
<CheckBoxPreference |
||||||
|
android:defaultValue="false" |
||||||
|
android:key="preference_force_phone_layout" |
||||||
|
android:title="@string/preference_force_phone_layout"/> |
||||||
|
|
||||||
|
</PreferenceScreen> |
Loading…
Reference in new issue