android.widget.Button.onSizeChanged()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(154)

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

Button.onSizeChanged介绍

暂无

代码示例

代码示例来源:origin: ZieIony/Carbon

@Override
protected void onSizeChanged(int width, int height, int oldwidth, int oldheight) {
  super.onSizeChanged(width, height, oldwidth, oldheight);
  if (width != oldwidth || height != oldheight)
    adjustTextSize();
}

代码示例来源:origin: qiujuer/Genius-Android

@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
  super.onSizeChanged(w, h, oldw, oldh);
  TouchEffectDrawable drawable = mTouchDrawable;
  if (drawable != null) {
    drawable.setBounds(0, 0, getWidth(), getHeight());
  }
}

代码示例来源:origin: dmytrodanylyk/android-morphing-button

@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
  super.onSizeChanged(w, h, oldw, oldh);
  if (mHeight == 0 && mWidth == 0 && w != 0 && h != 0) {
    mHeight = getHeight();
    mWidth = getWidth();
  }
}

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

@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh)
{
  super.onSizeChanged(w, h, oldw, oldh);
  mMaxRadius = (float) Math.sqrt(w * w + h * h);
}

代码示例来源:origin: AlexZhuo/SensorMonitor

@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
  super.onSizeChanged(w, h, oldw, oldh);
  if (shimmerViewHelper != null) {
    shimmerViewHelper.onSizeChanged();
  }
}

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

/**
 */
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
  super.onSizeChanged(w, h, oldw, oldh);
  this.ensureDecorator();
  mDecorator.onSizeChanged(w, h, oldw, oldh);
}

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

/**
 */
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
  super.onSizeChanged(w, h, oldw, oldh);
  this.ensureDecorator();
  mDecorator.onSizeChanged(w, h, oldw, oldh);
}

代码示例来源:origin: jiang111/CProgressButton

@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
  super.onSizeChanged(w, h, oldw, oldh);
  mWidth = w - getPaddingLeft() - getPaddingRight();
  mHeight = h - getPaddingTop() - getPaddingRight();
  if (mState == STATE.NORMAL || (mState == STATE.PROGRESS && morphingCircle)) {
    setBound(0);
  } else {
    invalidate();
  }
}

代码示例来源:origin: arnowelzel/periodical

/**
 * Handle size changes to adapt size specific elements
 *
 * @param w
 * Current width
 *
 * @param h
 * Current height
 *
 * @param oldw
 * Old width
 *
 * @param oldh
 * Old height
 */
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
  super.onSizeChanged(w, h, oldw, oldh);
  rectCanvas.set(0, 0, w, h);
  gradientPeriodConfirmed = makeCellGradient(0xfff44336, 0xfff44336);
  gradientPeriodPredicted = makeCellGradient(0xffef9a9a, 0xffef9a9a);
  gradientFertilityPredicted = makeCellGradient(0xff2196F3, 0xff2196F3);
  gradientFertilityFuture = makeCellGradient(0xff90CAF9, 0xff90CAF9);
  gradientInfertilePredicted = makeCellGradient(0xffffee58, 0xffffee58);
  gradientInfertileFuture = makeCellGradient(0xfffff59d, 0xfffff59d);
}

相关文章

Button类方法