mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 04:13:53 +01:00
Prevent hiding bottom navigation bar in MediaDetailPagerFragment
This commit is contained in:
parent
cc7ce34021
commit
976e2112e7
1 changed files with 8 additions and 2 deletions
|
|
@ -109,8 +109,6 @@ class MediaDetailPagerFragment : CommonsDaggerSupportFragment(), OnPageChangeLis
|
|||
// If fragment is associated with ProfileActivity, then hide the tabLayout
|
||||
if (activity is ProfileActivity) {
|
||||
(activity as ProfileActivity).setTabLayoutVisibility(false)
|
||||
} else if (activity is MainActivity) {
|
||||
(activity as MainActivity).hideTabs()
|
||||
}
|
||||
|
||||
binding!!.mediaDetailsPager.adapter = adapter
|
||||
|
|
@ -142,6 +140,14 @@ class MediaDetailPagerFragment : CommonsDaggerSupportFragment(), OnPageChangeLis
|
|||
initProvider()
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
if (activity is MainActivity) {
|
||||
(activity as MainActivity).showTabs()
|
||||
}
|
||||
binding = null
|
||||
}
|
||||
|
||||
/**
|
||||
* initialise the provider, based on from where the fragment was started, as in from an activity
|
||||
* or a fragment
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue