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="dialog_close">Close</string>
|
||||||
<string name="donate_select">Please select the donation</string>
|
<string name="donate_select">Please select the donation</string>
|
||||||
<string name="donate_do">Donate!</string>
|
<string name="donate_do">Donate!</string>
|
||||||
|
<string name="tablet_article_swipe">Swipe between articles</string>
|
||||||
</resources>
|
</resources>
|
@ -92,6 +92,11 @@
|
|||||||
android:key="combined_mode"
|
android:key="combined_mode"
|
||||||
android:summary="@string/combined_mode_summary"
|
android:summary="@string/combined_mode_summary"
|
||||||
android:title="@string/combined_mode" />
|
android:title="@string/combined_mode" />
|
||||||
|
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="tablet_article_swipe"
|
||||||
|
android:title="@string/tablet_article_swipe" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory android:title="@string/offline_mode" >
|
<PreferenceCategory android:title="@string/offline_mode" >
|
||||||
|
@ -1709,7 +1709,7 @@ public class MainActivity extends FragmentActivity implements OnlineServices {
|
|||||||
|
|
||||||
Fragment frag;
|
Fragment frag;
|
||||||
|
|
||||||
if (m_smallScreenMode) {
|
if (m_smallScreenMode || m_prefs.getBoolean("tablet_article_swipe", false)) {
|
||||||
frag = new ArticlePager(article);
|
frag = new ArticlePager(article);
|
||||||
} else {
|
} else {
|
||||||
frag = new ArticleFragment(article);
|
frag = new ArticleFragment(article);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss;
|
||||||
|
|
||||||
|
import android.content.res.Configuration;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceActivity;
|
import android.preference.PreferenceActivity;
|
||||||
|
|
||||||
@ -10,5 +11,10 @@ public class PreferencesActivity extends PreferenceActivity {
|
|||||||
super.onCreate(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