@Override
  protected void dispatchDraw(Canvas canvas) {
    super.dispatchDraw(canvas);

    if (mPinnedSection != null) {

      // prepare variables
      int pLeft = getListPaddingLeft();
      int pTop = getListPaddingTop();
      View view = mPinnedSection.view;

      // draw child
      canvas.save();

      int clipHeight =
          view.getHeight()
              + (mShadowDrawable == null ? 0 : Math.min(mShadowHeight, mSectionsDistanceY));
      canvas.clipRect(pLeft, pTop, pLeft + view.getWidth(), pTop + clipHeight);

      canvas.translate(pLeft, pTop + mTranslateY);
      drawChild(canvas, mPinnedSection.view, getDrawingTime());

      if (mShadowDrawable != null && mSectionsDistanceY > 0) {
        mShadowDrawable.setBounds(
            mPinnedSection.view.getLeft(),
            mPinnedSection.view.getBottom(),
            mPinnedSection.view.getRight(),
            mPinnedSection.view.getBottom() + mShadowHeight);
        mShadowDrawable.draw(canvas);
      }

      canvas.restore();
    }
  }
 /**
  * dispatchDraw gets invoked when all the child views are about to be drawn. By overriding this
  * method, the hover cell (BitmapDrawable) can be drawn over the listview's items whenever the
  * listview is redrawn.
  */
 @Override
 protected void dispatchDraw(Canvas canvas) {
   super.dispatchDraw(canvas);
   if (mHoverCell != null) {
     mHoverCell.draw(canvas);
   }
 }
 @Override
 protected void dispatchDraw(Canvas canvas) {
   super.dispatchDraw(canvas);
   if (mHeaderViewVisible) {
     drawChild(canvas, mHeaderView, getDrawingTime());
   }
 }
Example #4
0
  @Override
  protected void dispatchDraw(Canvas canvas) {
    super.dispatchDraw(canvas);

    if (scrollBarPanel != null && scrollBarPanel.getVisibility() == View.VISIBLE) {
      drawChild(canvas, scrollBarPanel, getDrawingTime());
    }
  }
Example #5
0
 protected void dispatchDraw(Canvas paramCanvas) {
   if ((!this.hasAlpha) && (this.alpha != 255))
     paramCanvas.saveLayerAlpha(new RectF(paramCanvas.getClipBounds()), this.alpha, 31);
   while (true) {
     if ((!this.hasScaled) && (this.scale != 1.0F))
       paramCanvas.scale(this.scale, this.scale, this.centerPoint.x, this.centerPoint.y);
     super.dispatchDraw(paramCanvas);
     paramCanvas.restore();
     return;
     paramCanvas.save();
   }
 }
 protected void dispatchDraw(Canvas canvas)
 {
     try
     {
         super.dispatchDraw(canvas);
         return;
     }
     catch (IndexOutOfBoundsException indexoutofboundsexception)
     {
         indexoutofboundsexception.printStackTrace();
     }
 }
 @Override
 protected void dispatchDraw(Canvas canvas) {
   /**
    * This is a bit hacky, but Samsung's ListView has got a bug in it when using Header/Footer
    * Views and the list is empty. This masks the issue so that it doesn't cause an FC. See Issue
    * #66.
    */
   try {
     super.dispatchDraw(canvas);
   } catch (IndexOutOfBoundsException e) {
     e.printStackTrace();
   }
 }
  /**
   * By overriding dispatchDraw, we can draw the cells that disappear during the expansion process.
   * When the cell expands, some items below or above the expanding cell may be moved off screen and
   * are thus no longer children of the ListView's layout. By storing a reference to these views
   * prior to the layout, and guaranteeing that these cells do not get recycled, the cells can be
   * drawn directly onto the canvas during the animation process. After the animation completes, the
   * references to the extra views can then be discarded.
   */
  @Override
  protected void dispatchDraw(Canvas canvas) {
    super.dispatchDraw(canvas);

    if (mViewsToDraw.size() == 0) {
      return;
    }

    for (View v : mViewsToDraw) {
      canvas.translate(0, v.getTop());
      v.draw(canvas);
      canvas.translate(0, -v.getTop());
    }
  }
  @Override
  protected void dispatchDraw(Canvas canvas) {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) {
      post(
          new Runnable() {

            @Override
            public void run() {
              scrollChanged(StickyListHeadersListView.super.getFirstVisiblePosition());
            }
          });
    }
    if (!drawingListUnderStickyHeader) {
      canvas.clipRect(
          0, Math.max(frame.getHeaderBottomPosition(), 0), canvas.getWidth(), canvas.getHeight());
    }
    super.dispatchDraw(canvas);
  }
Example #10
0
 @Override
 protected void dispatchDraw(Canvas canvas) {
   super.dispatchDraw(canvas);
   utilDynamicListView.dispatchDraw(canvas);
 }