Skip to content

Commit e281beb

Browse files
author
Dean Wild
committed
fix tooltip distance when using wide view targets and rectangle shapes
1 parent bfa1971 commit e281beb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/src/main/java/uk/co/deanwild/materialshowcaseview/shape/RectangleShape.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public void updateTarget(Target target) {
7676

7777
@Override
7878
public int getTotalRadius() {
79-
return (width / 2) + padding;
79+
return (height / 2) + padding;
8080
}
8181

8282
@Override

sample/src/main/java/uk/co/deanwild/materialshowcaseviewsample/TooltipExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void presentShowcaseView() {
7979
sequence.addSequenceItem(
8080

8181
new MaterialShowcaseView.Builder(this)
82-
.setTarget(mButtonShow)
82+
.setTarget(toolbar)
8383
.setToolTip(toolTip1)
8484
.withRectangleShape()
8585
.setTooltipMargin(30)

0 commit comments

Comments
 (0)