diff --git a/README.md b/README.md index 9b30e22..c9ef812 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,11 @@ *

工作原理

* 首先它需要一个目标View或者它的id,我们通过findViewById来得到这个View,计算它在屏幕上的区域targetRect,通过这个区域,开始绘制一个覆盖整个Activity的遮罩,可以定义遮罩的颜色和透明度,然而目标View被绘制成透明从而实现高亮的效果。接下来是在相对于这个targetRect的区域绘制一些图片或者文字。我们把这样一张图片或者文字抽象成一个Component接口,设置文字或者图片,所有的图片文字都是相对于targetRect来定义的。可以设定额外的x,y偏移量,可以对遮罩系统设置可见状态的发生变化时的监听回调,可以对遮罩系统设置开始和结束时的动画效,另外,我们可以不对整个Activity覆盖遮罩,而是对某一个View覆盖遮罩。

*

注意:具体用法参见demo,内附详细注释

- * ![image]( https://github.com/binIoter/GuideView/blob/master/app/src/main/res/assets/review.gif )

+ * ![image]( https://github.com/binIoter/GuideView/blob/master/app/src/main/assets/img1.png )

+ * ![image]( https://github.com/binIoter/GuideView/blob/master/app/src/main/assets/img2.png )

+ * ![image]( https://github.com/binIoter/GuideView/blob/master/app/src/main/assets/img3.png )

+ * ![image]( https://github.com/binIoter/GuideView/blob/master/app/src/main/assets/img4.png )

+ * ![image]( https://github.com/binIoter/GuideView/blob/master/app/src/main/assets/img5.png )

*

usage

public class SimpleComponent implements Component { diff --git a/app/src/main/assets/img1.png b/app/src/main/assets/img1.png index 57dba19..6b0b6b2 100644 Binary files a/app/src/main/assets/img1.png and b/app/src/main/assets/img1.png differ