@Test public void testCalcActionArrowRectF() { ImageView mMock = mock(ImageView.class); when(mMock.getHeight()).thenReturn(20); when(mMock.getWidth()).thenReturn(30); when(mMock.getX()).thenReturn(2f); when(mMock.getY()).thenReturn(3f); mCoachmarkView.mIvActionArrow = mMock; RectF mRectF = mCoachmarkView.calcActionArrowRect(); Assert.assertEquals(30.0f, mRectF.width()); Assert.assertEquals(20.0f, mRectF.height()); Assert.assertEquals(2.0f, mRectF.left); Assert.assertEquals(3.0f, mRectF.top); }
@NonNull public RectF calcActionArrowRect() { return new RectF(mIvActionArrow.getX(), mIvActionArrow.getY(), mIvActionArrow.getX() + mIvActionArrow.getWidth(), mIvActionArrow.getY() + mIvActionArrow.getHeight()); }
CoachmarkView extends FrameLayout implements CoachmarkViewLayout, AnimationListener { @NonNull public RectF calcActionArrowRect() { return new RectF(mIvActionArrow.getX(), mIvActionArrow.getY(), mIvActionArrow.getX() + mIvActionArrow.getWidth(), mIvActionArrow.getY() + mIvActionArrow.getHeight()); } }
CoachmarkView extends FrameLayout implements CoachmarkViewLayout, AnimationListener { @NonNull public RectF calcActionArrowRect() { return new RectF(mIvActionArrow.getX(), mIvActionArrow.getY(), mIvActionArrow.getX() + mIvActionArrow.getWidth(), mIvActionArrow.getY() + mIvActionArrow.getHeight()); } CoachmarkView(Context context);  CoachmarkView(Context context, AttributeSet attrs);  CoachmarkView(Context context, AttributeSet attrs, int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  CoachmarkView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes); }
CoachmarkView extends FrameLayout implements CoachmarkViewLayout, AnimationListener { @NonNull public RectF calcActionArrowRect() { return new RectF(mIvActionArrow.getX(), mIvActionArrow.getY(), mIvActionArrow.getX() + mIvActionArrow.getWidth(), mIvActionArrow.getY() + mIvActionArrow.getHeight()); } CoachmarkView(Context context);  CoachmarkView(Context context, AttributeSet attrs);  CoachmarkView(Context context, AttributeSet attrs, int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  CoachmarkView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes); @Override void onAnimationFinished(); CoachmarkView show(); @NonNull RectF calcActionArrowRect(); RectF calcActionDescriptionRect(); RectF calcDescriptionRect(); RectF calcScreenRectF(); RectF calcCircleRectF(); @Override boolean isInEditMode(); void setActionDescription(View actionDescription); void setDescription(View description); void setActionDescriptionRenderer(ActionDescriptionRenderer... actionDescriptionRenderer); void setDescriptionRenderer(DescriptionRenderer descriptionRenderer); void setView(View view); void setButtonRenderer(ButtonRenderer buttonRenderer); void setBackColor(int backColor); void setPaddingAroundCircle(int paddingAroundCircle); @Override void dismiss(); void setAnimationRenderer(AnimationRenderer animationRenderer); void setDismissListener(DismissListener listener); }
CoachmarkView extends FrameLayout implements CoachmarkViewLayout, AnimationListener { @NonNull public RectF calcActionArrowRect() { return new RectF(mIvActionArrow.getX(), mIvActionArrow.getY(), mIvActionArrow.getX() + mIvActionArrow.getWidth(), mIvActionArrow.getY() + mIvActionArrow.getHeight()); } CoachmarkView(Context context);  CoachmarkView(Context context, AttributeSet attrs);  CoachmarkView(Context context, AttributeSet attrs, int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  CoachmarkView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes); @Override void onAnimationFinished(); CoachmarkView show(); @NonNull RectF calcActionArrowRect(); RectF calcActionDescriptionRect(); RectF calcDescriptionRect(); RectF calcScreenRectF(); RectF calcCircleRectF(); @Override boolean isInEditMode(); void setActionDescription(View actionDescription); void setDescription(View description); void setActionDescriptionRenderer(ActionDescriptionRenderer... actionDescriptionRenderer); void setDescriptionRenderer(DescriptionRenderer descriptionRenderer); void setView(View view); void setButtonRenderer(ButtonRenderer buttonRenderer); void setBackColor(int backColor); void setPaddingAroundCircle(int paddingAroundCircle); @Override void dismiss(); void setAnimationRenderer(AnimationRenderer animationRenderer); void setDismissListener(DismissListener listener);  }