Skip to content

Commit

Permalink
# implemented possibility to create coachmark without focused view
Browse files Browse the repository at this point in the history
  • Loading branch information
sbra0902 committed Apr 24, 2018
1 parent f0d22e3 commit ca62321
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,11 @@ protected void dispatchDraw(Canvas canvas) {

if(!mIsInitialized){
mIsInitialized = true;
if (view != null) {

if (mAnimationRenderer == null) {
mAnimationRenderer = new NoAnimationRenderer();
}

mAnimationRenderer.animate(CoachmarkView.this, mCircleView, CoachmarkView.this);


if (mAnimationRenderer == null) {
mAnimationRenderer = new NoAnimationRenderer();
}

mAnimationRenderer.animate(CoachmarkView.this, mCircleView, CoachmarkView.this);
}
}

Expand Down Expand Up @@ -219,6 +214,10 @@ public RectF calcScreenRectF() {
}

public RectF calcCircleRectF() {

if(view == null){
return new RectF();
}
float radius = marginArroundCircle + view.getWidth() / 2;
int[] xy = new int[2];
view.getLocationOnScreen(xy);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public CoachmarkView buildAroundView(View view) {
return mCoachmarkView;
}

public CoachmarkView build() {
mCoachmarkView.setView(null);
return mCoachmarkView;
}

public CoachmarkViewBuilder withBackgroundColor(int color) {
mCoachmarkView.setBackColor(color);
return this;
Expand Down

0 comments on commit ca62321

Please sign in to comment.