fixed media viewer system window insets

This commit is contained in:
Mariotaku Lee 2017-08-06 19:54:30 +08:00
parent 93f843dd8d
commit 892f68358e
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
1 changed files with 2 additions and 1 deletions

View File

@ -406,13 +406,14 @@ class MediaViewerActivity : BaseActivity(), IMediaViewerActivity, MediaSwipeClos
}
override fun onApplyWindowInsets(v: View, insets: WindowInsetsCompat): WindowInsetsCompat {
val result = super.onApplyWindowInsets(v, insets)
val adapter = viewPager.adapter
if (adapter.count == 0) return insets
val fragment = adapter.instantiateItem(viewPager, viewPager.currentItem)
if (fragment is IBaseFragment<*>) {
fragment.requestApplyInsets()
}
return insets
return result
}
private fun processShareIntent(intent: Intent) {