You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i face some issue to highlight view . when i use this some device show it perfect. some device not show perfectly . so i make some adjustment to achieve this .
here i show code which i make adjustment.
private void addCircleOnView(float additionalRadiusRatio) {
Rect rect = new Rect();
int[] locations = new int[2];
view.getGlobalVisibleRect(rect);
view.getLocationOnScreen(locations);
Log.i(TAG, "addCircleOnView: rect values");
Log.i(TAG, "addCircleOnView:left " + rect.left);
Log.i(TAG, "addCircleOnView:top " + rect.top);
Log.i(TAG, "addCircleOnView:right " + rect.right);
Log.i(TAG, "addCircleOnView:bottom " + rect.bottom);
Log.i(TAG, "addCircleOnView: using view's method");
Log.i(TAG, "addCircleOnView:X " + view.getX());
Log.i(TAG, "addCircleOnView:Y " + view.getY());
Log.i(TAG, "addCircleOnView:get top " + view.getTop());
Log.i(TAG, "addCircleOnView: get left " + view.getLeft());
Log.i(TAG, "addCircleOnView: get right " + view.getRight());
Log.i(TAG, "addCircleOnView:get bottom " + view.getBottom());
Log.i(TAG, "addCircleOnView: loction on screen");
Log.i(TAG, "addCircleOnView:location X " + locations[0]);
Log.i(TAG, "addCircleOnView: location Y " + locations[1]);
view.getLocationOnScreen(locations);
int cx;
cx = (int) (rect.left + rect.top - view.getY());
int cy = rect.top;
// int cy = locations[1];
int radius = (int) (Math.max(rect.width(), rect.height()) / 2f * additionalRadiusRatio);
Circle circle = new Circle(cx, cy, radius);
circle.setDisplayBorder(settings.withBorder);
private void addRoundRectOnView(float additionalRadiusRatio) {
Rect rect = new Rect();
int locations[] = new int[2];
view.getLocationOnScreen(locations);
view.getGlobalVisibleRect(rect);
int padding;
Log.i(TAG, "addRectOnView: rect values");
Log.i(TAG, "addRectOnView:left " + rect.left);
Log.i(TAG, "addRectOnView:top " + rect.top);
Log.i(TAG, "addRectOnView:right " + rect.right);
Log.i(TAG, "addRectOnView:bottom " + rect.bottom);
Log.i(TAG, "addRectOnView:width " + rect.width());
Log.i(TAG, "addRectOnView:height " + rect.height());
Log.i(TAG, "addRectOnView: using view's method");
Log.i(TAG, "addRectOnView:X " + view.getX());
Log.i(TAG, "addRectOnView:Y " + view.getY());
Log.i(TAG, "addRectOnView:get top " + view.getTop());
Log.i(TAG, "addRectOnView: get left " + view.getLeft());
Log.i(TAG, "addRectOnView: get right " + view.getRight());
Log.i(TAG, "addRectOnView:get bottom " + view.getBottom());
Log.i(TAG, "addRectOnView:width " + view.getWidth());
Log.i(TAG, "addRectOnView:height " + view.getHeight());
Log.i(TAG, "addRectOnView: loction on screen");
Log.i(TAG, "addRectOnView:location X " + locations[0]);
Log.i(TAG, "addRectOnView: location Y " + locations[1]);
int x, y, width, height;
if (Build.VERSION.SDK_INT < 20) {
x = view.getLeft() - view.getLeft() / 4;
y = locations[1] - 40;
width = view.getWidth() + view.getLeft() / 2;
height = rect.height();
} else {
x = view.getLeft() - view.getLeft() / 4;
y = rect.top;
width = view.getWidth() + view.getLeft() / 2;
height = rect.height();
}
RoundRect roundRect = new RoundRect(x, y, width, height);
roundRect.setDisplayBorder(settings.withBorder);
tutoShowcase.tutoView.addRoundRect(roundRect);
addClickableView(rect, settings.onClickListener, additionalRadiusRatio);
tutoShowcase.tutoView.postInvalidate();
}
The text was updated successfully, but these errors were encountered:
i face some issue to highlight view . when i use this some device show it perfect. some device not show perfectly . so i make some adjustment to achieve this .
here i show code which i make adjustment.
// int cy = locations[1];
int radius = (int) (Math.max(rect.width(), rect.height()) / 2f * additionalRadiusRatio);
Circle circle = new Circle(cx, cy, radius);
circle.setDisplayBorder(settings.withBorder);
private void addRoundRectOnView(float additionalRadiusRatio) {
Rect rect = new Rect();
int locations[] = new int[2];
view.getLocationOnScreen(locations);
view.getGlobalVisibleRect(rect);
int padding;
The text was updated successfully, but these errors were encountered: