add optional article swiping for xlarge devices
This commit is contained in:
parent
8e45b14c61
commit
59a4d3d439
@ -126,4 +126,5 @@
|
||||
<string name="dialog_close">Close</string>
|
||||
<string name="donate_select">Please select the donation</string>
|
||||
<string name="donate_do">Donate!</string>
|
||||
<string name="tablet_article_swipe">Swipe between articles</string>
|
||||
</resources>
|
@ -92,6 +92,11 @@
|
||||
android:key="combined_mode"
|
||||
android:summary="@string/combined_mode_summary"
|
||||
android:title="@string/combined_mode" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="tablet_article_swipe"
|
||||
android:title="@string/tablet_article_swipe" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/offline_mode" >
|
||||
|
@ -1709,7 +1709,7 @@ public class MainActivity extends FragmentActivity implements OnlineServices {
|
||||
|
||||
Fragment frag;
|
||||
|
||||
if (m_smallScreenMode) {
|
||||
if (m_smallScreenMode || m_prefs.getBoolean("tablet_article_swipe", false)) {
|
||||
frag = new ArticlePager(article);
|
||||
} else {
|
||||
frag = new ArticleFragment(article);
|
||||
|
@ -1,14 +1,20 @@
|
||||
package org.fox.ttrss;
|
||||
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceActivity;
|
||||
|
||||
public class PreferencesActivity extends PreferenceActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
addPreferencesFromResource(R.xml.preferences);
|
||||
}
|
||||
addPreferencesFromResource(R.xml.preferences);
|
||||
|
||||
if ((getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) != Configuration.SCREENLAYOUT_SIZE_XLARGE) {
|
||||
getPreferenceScreen().removePreference(
|
||||
findPreference("tablet_article_swipe"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user