add preference to disable fab
This commit is contained in:
parent
fba3486928
commit
487d05e6c0
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.fox.ttrss"
|
package="org.fox.ttrss"
|
||||||
android:versionCode="278"
|
android:versionCode="279"
|
||||||
android:versionName="1.70" >
|
android:versionName="1.71" >
|
||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="9"
|
android:minSdkVersion="9"
|
||||||
|
@ -100,6 +100,7 @@ public class ArticleFragment extends Fragment {
|
|||||||
View fab = view.findViewById(R.id.article_fab);
|
View fab = view.findViewById(R.id.article_fab);
|
||||||
|
|
||||||
if (scrollView != null && fab != null) {
|
if (scrollView != null && fab != null) {
|
||||||
|
if (m_prefs.getBoolean("enable_article_fab", true)) {
|
||||||
scrollView.setOnTouchListener(new ShowHideOnScroll(fab));
|
scrollView.setOnTouchListener(new ShowHideOnScroll(fab));
|
||||||
|
|
||||||
fab.setOnClickListener(new OnClickListener() {
|
fab.setOnClickListener(new OnClickListener() {
|
||||||
@ -117,6 +118,9 @@ public class ArticleFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
fab.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -142,6 +142,7 @@ public class OfflineArticleFragment extends Fragment {
|
|||||||
View fab = view.findViewById(R.id.article_fab);
|
View fab = view.findViewById(R.id.article_fab);
|
||||||
|
|
||||||
if (scrollView != null && fab != null) {
|
if (scrollView != null && fab != null) {
|
||||||
|
if (m_prefs.getBoolean("enable_article_fab", true)) {
|
||||||
scrollView.setOnTouchListener(new ShowHideOnScroll(fab));
|
scrollView.setOnTouchListener(new ShowHideOnScroll(fab));
|
||||||
|
|
||||||
fab.setOnClickListener(new OnClickListener() {
|
fab.setOnClickListener(new OnClickListener() {
|
||||||
@ -159,6 +160,9 @@ public class OfflineArticleFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
fab.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* View scroll = view.findViewById(R.id.article_scrollview);
|
/* View scroll = view.findViewById(R.id.article_scrollview);
|
||||||
|
@ -250,5 +250,7 @@
|
|||||||
<string name="headlines_sort_articles_title">Sort articles</string>
|
<string name="headlines_sort_articles_title">Sort articles</string>
|
||||||
<string name="fresh_articles">Fresh articles</string>
|
<string name="fresh_articles">Fresh articles</string>
|
||||||
<string name="feed_all_articles">All articles</string>
|
<string name="feed_all_articles">All articles</string>
|
||||||
|
<string name="prefs_enable_fab">Enable FAB</string>
|
||||||
|
<string name="prefs_enable_fab_long">Show floating action button while reading</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -143,6 +143,11 @@
|
|||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:key="confirm_headlines_catchup"
|
android:key="confirm_headlines_catchup"
|
||||||
android:title="@string/prefs_confirm_headlines_catchup" />
|
android:title="@string/prefs_confirm_headlines_catchup" />
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:defaultValue="true"
|
||||||
|
android:key="enable_article_fab"
|
||||||
|
android:summary="@string/prefs_enable_fab_long"
|
||||||
|
android:title="@string/prefs_enable_fab" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
<PreferenceCategory android:title="@string/offline_mode" >
|
<PreferenceCategory android:title="@string/offline_mode" >
|
||||||
<ListPreference
|
<ListPreference
|
||||||
|
Loading…
Reference in New Issue
Block a user