huburt-Hu / NewbieGuide

Android 快速实现新手引导层的库,通过简洁链式调用,一行代码实现引导层的显示
Apache License 2.0
3.56k stars 519 forks source link

NewbieGuide +ImmersionBar 位置错乱 #189

Open jyjiawohao opened 3 years ago

jyjiawohao commented 3 years ago

NewbieGuide +ImmersionBar 位置错乱 高亮区域偏离位置 到下面了

mingdeweidao commented 3 years ago

这个问题解决了吗?

OneGreenHand commented 2 years ago

RectF减去状态栏高度即可 Rect globalRect = new Rect(); viewBinding.adoption.getGlobalVisibleRect(globalRect); int statusBarHeight = BarUtils.getStatusBarHeight();//获取状态栏高度 NewbieGuide .with(mContext) .setLabel("Guide1") .alwaysShow(true) .addGuidePage(GuidePage.newInstance() .addHighLightWithOptions(new RectF(globalRect.left, globalRect.top - statusBarHeight, globalRect.right, globalRect.bottom - statusBarHeight), options)) .show();