fixed media viewer system window insets
This commit is contained in:
parent
93f843dd8d
commit
892f68358e
|
@ -406,13 +406,14 @@ class MediaViewerActivity : BaseActivity(), IMediaViewerActivity, MediaSwipeClos
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onApplyWindowInsets(v: View, insets: WindowInsetsCompat): WindowInsetsCompat {
|
override fun onApplyWindowInsets(v: View, insets: WindowInsetsCompat): WindowInsetsCompat {
|
||||||
|
val result = super.onApplyWindowInsets(v, insets)
|
||||||
val adapter = viewPager.adapter
|
val adapter = viewPager.adapter
|
||||||
if (adapter.count == 0) return insets
|
if (adapter.count == 0) return insets
|
||||||
val fragment = adapter.instantiateItem(viewPager, viewPager.currentItem)
|
val fragment = adapter.instantiateItem(viewPager, viewPager.currentItem)
|
||||||
if (fragment is IBaseFragment<*>) {
|
if (fragment is IBaseFragment<*>) {
|
||||||
fragment.requestApplyInsets()
|
fragment.requestApplyInsets()
|
||||||
}
|
}
|
||||||
return insets
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun processShareIntent(intent: Intent) {
|
private fun processShareIntent(intent: Intent) {
|
||||||
|
|
Loading…
Reference in New Issue