Example #1
0
  /**
   * Get the ghostly gesture hand for custom gestures
   *
   * @return a View representing the ghostly hand
   */
  public View getHand() {
    final View mHandy =
        ((LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE))
            .inflate(R.layout.handy, null);
    addView(mHandy);
    AnimationUtils.hide(mHandy);

    return mHandy;
  }
Example #2
0
 private void fadeInShowcase() {
   AnimationUtils.createFadeInAnimation(
           this,
           getConfigOptions().fadeInDuration,
           new AnimationStartListener() {
             @Override
             public void onAnimationStart() {
               setVisibility(View.VISIBLE);
             }
           })
       .start();
 }
Example #3
0
 private void fadeOutShowcase() {
   AnimationUtils.createFadeOutAnimation(
           this,
           getConfigOptions().fadeOutDuration,
           new AnimationEndListener() {
             @Override
             public void onAnimationEnd() {
               setVisibility(View.GONE);
             }
           })
       .start();
 }
Example #4
0
 private void moveHand(
     float offsetStartX,
     float offsetStartY,
     float offsetEndX,
     float offsetEndY,
     AnimationEndListener listener) {
   AnimationUtils.createMovementAnimation(
           mHandy,
           showcaseX,
           showcaseY,
           offsetStartX,
           offsetStartY,
           offsetEndX,
           offsetEndY,
           listener)
       .start();
 }
Example #5
0
 /**
  * Point to a specific point on the screen
  *
  * @param x X-coordinate to point to
  * @param y Y-coordinate to point to
  */
 public void pointTo(float x, float y) {
   AnimationUtils.createMovementAnimation(mHandy, x, y).start();
 }
Example #6
0
 /**
  * Point to a specific view
  *
  * @param view The {@link View} to Showcase
  */
 public void pointTo(View view) {
   float x = AnimationUtils.getX(view) + view.getWidth() / 2;
   float y = AnimationUtils.getY(view) + view.getHeight() / 2;
   pointTo(x, y);
 }