if(root_view_height < DisplayUtils.getScreenHeight(VideoPlayerActivity.this)){
layoutParams.bottomMargin = mainInvisibleHeight- BarUtils.getNavBarHeight();
}else {
layoutParams.bottomMargin = mainInvisibleHeight;
}
root_view_height 为根布局的高度
DisplayUtils.getScreenHeight(VideoPlayerActivity.this) 屏幕的高度
root_view.post(new Runnable() {
@Override
public void run() {
root_view_height = root_view.getHeight();
}
});
网友评论