mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-09 19:10:42 +00:00
For #1408 - Set Toolbar titles in code (vs in navgraph)
This commit is contained in:
parent
65235d5cf3
commit
d7272d29de
@ -37,6 +37,7 @@ class LibraryFragment : Fragment() {
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
(activity as AppCompatActivity).title = getString(R.string.library_title)
|
||||
(activity as AppCompatActivity).supportActionBar?.show()
|
||||
}
|
||||
|
||||
|
@ -66,6 +66,7 @@ class BookmarkFragment : Fragment(), CoroutineScope, BackHandler, AccountObserve
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
(activity as AppCompatActivity).title = getString(R.string.library_bookmarks)
|
||||
(activity as AppCompatActivity).supportActionBar?.show()
|
||||
checkIfSignedIn()
|
||||
}
|
||||
|
@ -54,6 +54,8 @@ class AddBookmarkFolderFragment : Fragment(), CoroutineScope {
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
(activity as AppCompatActivity).title =
|
||||
getString(R.string.bookmark_add_folder_fragment_label)
|
||||
(activity as AppCompatActivity).supportActionBar?.show()
|
||||
|
||||
launch(IO) {
|
||||
|
@ -69,6 +69,7 @@ class EditBookmarkFragment : Fragment(), CoroutineScope {
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
(activity as? AppCompatActivity)?.title = getString(R.string.edit_bookmark_fragment_title)
|
||||
(activity as? AppCompatActivity)?.supportActionBar?.show()
|
||||
|
||||
guidToEdit = EditBookmarkFragmentArgs.fromBundle(arguments!!).guidToEdit
|
||||
|
@ -89,6 +89,8 @@ class SelectBookmarkFolderFragment : Fragment(), CoroutineScope, AccountObserver
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
(activity as AppCompatActivity).title =
|
||||
getString(R.string.bookmark_select_folder_fragment_label)
|
||||
(activity as AppCompatActivity).supportActionBar?.show()
|
||||
|
||||
folderGuid = SelectBookmarkFolderFragmentArgs.fromBundle(arguments!!).folderGuid ?: BookmarkRoot.Root.id
|
||||
|
@ -63,6 +63,7 @@ class HistoryFragment : Fragment(), CoroutineScope, BackHandler {
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
(activity as AppCompatActivity).title = getString(R.string.library_history)
|
||||
(activity as AppCompatActivity).supportActionBar?.show()
|
||||
}
|
||||
|
||||
|
@ -67,6 +67,7 @@ class SettingsFragment : PreferenceFragmentCompat(), CoroutineScope, AccountObse
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
(activity as AppCompatActivity).title = getString(R.string.settings_title)
|
||||
(activity as AppCompatActivity).supportActionBar?.show()
|
||||
val defaultBrowserPreference =
|
||||
findPreference<DefaultBrowserPreference>(getString(R.string.pref_key_make_default_browser))
|
||||
|
@ -22,6 +22,7 @@ class SitePermissionsFragment : PreferenceFragmentCompat() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
(activity as AppCompatActivity).title = getString(R.string.preferences_site_permissions)
|
||||
(activity as AppCompatActivity).supportActionBar?.show()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user