From 892f68358e70e43bbb2a3bf50b39f7371c5c4671 Mon Sep 17 00:00:00 2001 From: Mariotaku Lee Date: Sun, 6 Aug 2017 19:54:30 +0800 Subject: [PATCH] fixed media viewer system window insets --- .../org/mariotaku/twidere/activity/MediaViewerActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/twidere/src/main/kotlin/org/mariotaku/twidere/activity/MediaViewerActivity.kt b/twidere/src/main/kotlin/org/mariotaku/twidere/activity/MediaViewerActivity.kt index d1cf14c3f..95f595afa 100644 --- a/twidere/src/main/kotlin/org/mariotaku/twidere/activity/MediaViewerActivity.kt +++ b/twidere/src/main/kotlin/org/mariotaku/twidere/activity/MediaViewerActivity.kt @@ -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) {