Highlight
Highlight copied to clipboard
在魅族3的显示效果
没有添加引导的按钮,也高亮显示了
thx,能不能重新贴下图片,和详细的做法,我好修复下。
上传图片一直失败,发到你邮箱吧
@s3hengwu 不要加锚点就可以解决了
.anchor(findViewById(R.id.id_container)) //注释掉即可
@hongyangAndroid 应该大部分手机都会有问题 我参照源码看了下实现逻辑,通过直接修改xml添加child一样,如下
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/id_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/id_btn_important"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_margin="16dp"
android:onClick="remove"
android:text="账户信息" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#cc000000"/>
</RelativeLayout>
因为直接在通过studio预览的话 也是挡不住其他控件的,如图

if (mAnchor instanceof FrameLayout || mAnchor instanceof RelativeLayout)
{
ViewGroup.LayoutParams lp = new ViewGroup.LayoutParams
(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
((ViewGroup) mAnchor).addView(hightLightView, ((ViewGroup) mAnchor).getChildCount(), lp);
}
所以通过android.R.id.content顶级窗口添加 效果还是很好的,谢谢提供这么好的思路
多谢反馈,目前上述问题已经修复,感兴趣的话,可以再测试下。目前我个人测试没有问题。