This commit is contained in:
parent
0ccd2c4133
commit
f52fd355d8
4 changed files with 13 additions and 1 deletions
|
@ -168,6 +168,11 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
|
|||
|
||||
val pageMargin = resources.getDimensionPixelSize(R.dimen.tab_page_margin)
|
||||
viewPager.setPageTransformer(MarginPageTransformer(pageMargin))
|
||||
|
||||
val uswSwipeForTabs = PreferenceManager.getDefaultSharedPreferences(this)
|
||||
.getBoolean("enableSwipeForTabs", true)
|
||||
viewPager.isUserInputEnabled = uswSwipeForTabs
|
||||
|
||||
tabLayout.addOnTabSelectedListener(object : OnTabSelectedListener {
|
||||
override fun onTabSelected(tab: TabLayout.Tab) {
|
||||
if (tab.position == notificationTabPosition) {
|
||||
|
|
|
@ -129,7 +129,7 @@ class PreferencesActivity : BaseActivity(), SharedPreferences.OnSharedPreference
|
|||
|
||||
}
|
||||
"statusTextSize", "absoluteTimeView", "showBotOverlay", "animateGifAvatars",
|
||||
"useBlurhash", "showCardsInTimelines", "confirmReblogs" -> {
|
||||
"useBlurhash", "showCardsInTimelines", "confirmReblogs", "enableSwipeForTabs" -> {
|
||||
restartActivitiesOnExit = true
|
||||
}
|
||||
"language" -> {
|
||||
|
|
|
@ -541,6 +541,7 @@
|
|||
<string name="failed_search">Failed to search</string>
|
||||
|
||||
<string name="pref_title_show_notifications_filter">Show Notifications filter</string>
|
||||
<string name="pref_title_enable_swipe_for_tabs">Enable swipe gesture to switch between tabs</string>
|
||||
|
||||
|
||||
<string name="create_poll_title">Poll</string>
|
||||
|
|
|
@ -84,6 +84,12 @@
|
|||
android:title="@string/pref_title_confirm_reblogs"
|
||||
app:singleLineTitle="false" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:key="enableSwipeForTabs"
|
||||
android:title="@string/pref_title_enable_swipe_for_tabs"
|
||||
app:singleLineTitle="false" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/pref_title_browser_settings">
|
||||
|
|
Loading…
Reference in a new issue