android.support.v7.widget.CardView.draw()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(0.9k)|赞(0)|评价(0)|浏览(143)

本文整理了Java中android.support.v7.widget.CardView.draw()方法的一些代码示例,展示了CardView.draw()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CardView.draw()方法的具体详情如下:
包路径:android.support.v7.widget.CardView
类名称:CardView
方法名:draw

CardView.draw介绍

暂无

代码示例

代码示例来源:origin: seven332/EhViewer

@Override
public void draw(@NonNull Canvas canvas) {
  if (mInAnimation) {
    final int state = canvas.save();
    int bottom = MathUtils.lerp(mBaseHeight, mHeight, mProgress);
    mRect.set(0, 0, mWidth, bottom);
    canvas.clipRect(mRect);
    super.draw(canvas);
    canvas.restoreToCount(state);
  } else {
    super.draw(canvas);
  }
}

代码示例来源:origin: rey5137/material

@Override
public void draw(Canvas canvas) {
  super.draw(canvas);
  if(mShowDivider && (mPositiveAction.getVisibility() == View.VISIBLE || mNegativeAction.getVisibility() == View.VISIBLE || mNeutralAction.getVisibility() == View.VISIBLE))
    canvas.drawLine(getPaddingLeft(), mDividerPos, getWidth() - getPaddingRight(), mDividerPos, mDividerPaint);
}

相关文章