我正在使用 Github 中的这个库来制作 TapTargetView 的序列
https://github.com/KeepSafe/TapTargetView
我想使用 TapTargetSequence 但我不知道链接下页中提供的 Sequence 示例中此“TapTarget.forBounds ”的第一个参数 并且不知道Rect的含义
关于这个图书馆
https://github.com/sjwall/MaterialTapTargetPrompt
我不知道如何对这个库进行排序
最佳答案
来源TapTargetView :
Each tap target describes a target via a pair of bounds and icon. The bounds dictate the location and touch area of the target, where the icon is what will be drawn within the center of the bounds.
您应该提供 Rect定义起点和要显示 View 的目标区域的对象。 (左、上、右、下)。
如何为 View 创建目标矩形的示例(view
是您的按钮):
int[] loc = new int[2];
view.getLocationOnScreen(loc);
Rect rect = new Rect(loc[0], loc[1], loc[0] + view.getWidth(), l[1] + view.getHeight());
关于android - TapTarget.forBounds 的第一个参数是什么,它是什么意思 Rect,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40590609/