android.widget.SeekBar.onDraw()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(190)

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

SeekBar.onDraw介绍

暂无

代码示例

代码示例来源:origin: smuyyh/BookReader

@Override
protected synchronized void onDraw(Canvas canvas) {
  //canvas.rotate(-90);
  //canvas.translate(-getHeight(), 0);
  canvas.rotate(90);
  canvas.translate(0, -getWidth());
  super.onDraw(canvas);
}

代码示例来源:origin: aa112901/remusic

@Override
  protected synchronized void onDraw(Canvas canvas) {
    super.onDraw(canvas);
    if (drawLoading) {
      canvas.save();
      degree = ((int) (degree + 3.0F));
      degree %= 360;
      matrix.reset();
      matrix.postRotate(degree, loading.getWidth() / 2, loading.getHeight() / 2);
      canvas.translate(getPaddingLeft() + getThumb().getBounds().left + drawable.getIntrinsicWidth() / 2 - loading.getWidth() / 2 - getThumbOffset(), getPaddingTop() + getThumb().getBounds().top + drawable.getIntrinsicHeight() / 2 - loading.getHeight() / 2);
      canvas.drawBitmap(loading, matrix, null);
      canvas.restore();
      invalidate();
    }

  }
}

代码示例来源:origin: w1123440793/VideoListDemo

@Override
protected synchronized void onDraw(Canvas canvas) {
  canvas.rotate(-90);
  canvas.translate(-getHeight(),0);
  super.onDraw(canvas);
}

代码示例来源:origin: ksvc/KSYMediaPlayer_Android

protected void onDraw(Canvas c) {
  c.rotate(-90);
  c.translate(-getHeight(),0);
  super.onDraw(c);
}

代码示例来源:origin: tomahawk-player/tomahawk-android

@Override
protected void onDraw(@NonNull Canvas c) {
  c.rotate(-90);
  c.translate(-getHeight(), 0);
  super.onDraw(c);
}

代码示例来源:origin: 18Gray/ProCamera

@Override
protected void onDraw(Canvas c)
{
  c.rotate(-90);
  c.translate(-getHeight(), 0);
  super.onDraw(c);
}

代码示例来源:origin: eliotstocker/Light-Controller

protected void onDraw(Canvas c) {
  c.rotate(-90);
  c.translate(-getHeight(), 0);
  super.onDraw(c);
}

代码示例来源:origin: ksvc/KSYMediaPlayer_Android

protected void onDraw(Canvas c) {
  c.rotate(-90);
  c.translate(-getHeight(),0);
  super.onDraw(c);
}

代码示例来源:origin: gqjjqg/android-extend

protected void onDraw(Canvas c) {
  c.rotate(-90);
  c.translate(-getHeight(),0);
  super.onDraw(c);
}

代码示例来源:origin: apps4av/avare

protected void onDraw(Canvas c) {
  /*
   * Vertical
   */
  c.rotate(-90);
  c.translate(-getHeight(), 0);
  super.onDraw(c);
}

代码示例来源:origin: TongmingWu/Manga

@Override
protected synchronized void onDraw(Canvas canvas) {
  canvas.rotate(-90);
  canvas.translate(-getHeight(), 0);
  super.onDraw(canvas);
}

代码示例来源:origin: WiInputMethod/VE

protected void onDraw(Canvas c) {
  //将SeekBar转转90度  
  c.rotate(-90);
  //将旋转后的视图移动回来  
  c.translate(-getHeight(), 0);
  super.onDraw(c);
}

代码示例来源:origin: gpfduoduo/AirPlay-Receiver-on-Android

@Override
public void onDraw(Canvas canvas) {
  super.onDraw(canvas);
  if (mSegments == null) {
    return;
  }
  for (int i = 0; i < mSegments.length; i += 2) {
    double begin = mSegments[i];
    double end = mSegments[i + 1];
    int available = getWidth() - getPaddingLeft() - getPaddingRight();
    int length = (int) ((end - begin) * available);
    mBounds.left = (int) (begin * available);
    mBounds.right = mBounds.left + length;
    mBounds.top = getHeight() / 2 - 4;
    mBounds.bottom = getHeight() / 2 + 2;
    canvas.save();
    canvas.translate(getPaddingLeft(), getPaddingTop());
    canvas.drawRect(mBounds, mPaint);
    canvas.restore();
  }
}

代码示例来源:origin: com.albedinsky.android/ui-widget-picker

/**
 */
@Override
@SuppressWarnings("NewApi")
protected synchronized void onDraw(@NonNull Canvas canvas) {
  super.onDraw(canvas);
  if (mDecorator.hasPrivateFlag(PFLAG_DISCRETE) && mAnimations.shouldDraw()) {
    this.drawDiscreteInterval(canvas);
    this.drawDiscreteIndicator(canvas);
    if (mAnimations.areRunning() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
      postInvalidateOnAnimation();
    }
  }
}

代码示例来源:origin: com.albedinsky.android/ui

/**
 */
@Override
@SuppressWarnings("NewApi")
protected synchronized void onDraw(@NonNull Canvas canvas) {
  super.onDraw(canvas);
  if (mDecorator.hasPrivateFlag(PFLAG_DISCRETE) && mAnimations.shouldDraw()) {
    this.drawDiscreteInterval(canvas);
    this.drawDiscreteIndicator(canvas);
    if (mAnimations.areRunning() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
      postInvalidateOnAnimation();
    }
  }
}

相关文章

SeekBar类方法