Skip to content

Commit

Permalink
fix padding on tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean Wild committed Apr 2, 2019
1 parent 9d6e4f4 commit c240b39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Expand Up @@ -878,8 +878,6 @@ public MaterialShowcaseView build() {

showcaseView.mShape.setPadding(showcaseView.mShapePadding);

// showcaseView.setPadding(10,10,10,10);

return showcaseView;
}

Expand Down
Expand Up @@ -302,14 +302,15 @@ public static class TooltipView extends FrameLayout {

private int paddingTop = 20;
private int paddingBottom = 30;
private int paddingRight = 30;
private int paddingLeft = 30;
private int paddingRight = 60;
private int paddingLeft = 60;

private Rect viewRect;
private int distanceWithView = 0;

public TooltipView(Context context) {
super(context);

setWillNotDraw(false);

this.childView = new TextView(context);
Expand Down Expand Up @@ -535,9 +536,9 @@ private Path drawBubble(RectF myRect, float topLeftDiameter, float topRightDiame
bottomLeftDiameter = bottomLeftDiameter < 0 ? 0 : bottomLeftDiameter;
bottomRightDiameter = bottomRightDiameter < 0 ? 0 : bottomRightDiameter;

final float spacingLeft = this.position == Position.RIGHT ? arrowHeight : 0;
float spacingLeft = 30;
final float spacingTop = this.position == Position.BOTTOM ? arrowHeight : 0;
final float spacingRight = this.position == Position.LEFT ? arrowHeight : 0;
float spacingRight = 30;
final float spacingBottom = this.position == Position.TOP ? arrowHeight : 0;

final float left = spacingLeft + myRect.left;
Expand Down

0 comments on commit c240b39

Please sign in to comment.