Fixed player's ZOOM mode for KitKat devices

This commit is contained in:
Avently 2020-09-27 04:25:06 +03:00
parent 4379fdb763
commit 73eca41204
2 changed files with 27 additions and 22 deletions

View file

@ -1946,7 +1946,13 @@ public class VideoDetailFragment
}
scrollToTop();
addVideoPlayerView();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
addVideoPlayerView();
} else {
// KitKat needs a delay before addVideoPlayerView call or it reports wrong height in
// activity.getWindow().getDecorView().getHeight()
new Handler().post(this::addVideoPlayerView);
}
}
@Override