Highlight
Highlight copied to clipboard
按照Demo提示,添加了,只有高亮,并没有显示出来自定义Layout里边的ImageView,求教是什么原因
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@android:color/darker_gray" android:orientation="vertical">
<ImageView
android:id="@+id/id_iv_tip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/guide_home_ism" />
- 请自定义
addHighLight第三个参数 提示布局相对高亮高亮布局的定位属性 或直接newHighLight.OnPosCallback() - 图片资源建议放在drawable目录下 mipmap目录下官方推荐放icon
有一个缺点是,我每需要一个蒙板,就需要一个对应的layout文件,容易造成资源冗余~是否可以实现使用一个layout,然后通过代码控制ImageView的改变呢~
你说的是next模式吧 每次添加一个适合复杂的情况 更灵活 如果每一步的提示布局雷同 你想自定义的话 你可以在show() 之后findviewbyid得到提示布局控件进行操作