Add option to disable collapsing app bars

pull/1737/head
Alex Baker 3 years ago
parent 4bda63b43d
commit aee564471a

@ -231,6 +231,10 @@ class TaskListFragment : Fragment(), OnRefreshListener, Toolbar.OnMenuItemClickL
binding.toolbar.navigationIcon = null
binding.bottomAppBar
}
if (!preferences.getBoolean(R.string.p_app_bar_collapse, true)) {
binding.bottomAppBar.hideOnScroll = false
(binding.toolbar.layoutParams as AppBarLayout.LayoutParams).scrollFlags = 0
}
toolbar.setOnMenuItemClickListener(this)
toolbar.setNavigationOnClickListener { callbacks.onNavigationIconClicked() }
setupMenu(toolbar)

@ -74,7 +74,6 @@
android:theme="?attr/overlay_theme"
app:popupTheme="@style/popup_overlay"
app:hideOnScroll="true"
app:layout_scrollFlags="scroll|enterAlways"
app:navigationIcon="@drawable/ic_outline_menu_24px" />
<com.google.android.material.floatingactionbutton.FloatingActionButton

@ -446,4 +446,5 @@
<string name="p_picker_mode_time">picker_mode_time</string>
<string name="p_markdown">markdown</string>
<string name="p_app_bar_position">app_bar_position</string>
<string name="p_app_bar_collapse">app_bar_collapse</string>
</resources>

@ -708,6 +708,7 @@ File %1$s contained %2$s.\n\n
<string name="markdown_description">Enable Markdown in title and description</string>
<string name="completion_sound">Play completion sound</string>
<string name="app_bar_position">App bar position</string>
<string name="app_bar_collapse">Collapse app bars</string>
<string name="top">Top</string>
<string name="bottom">Bottom</string>
<string name="completed">Completed</string>

@ -62,6 +62,11 @@
android:entryValues="@array/two_values"
android:title="@string/app_bar_position" />
<SwitchPreference
android:defaultValue="true"
android:key="@string/p_app_bar_collapse"
android:title="@string/app_bar_collapse" />
<SeekBarPreference
android:defaultValue="16"
android:key="@string/p_fontSize"

Loading…
Cancel
Save