android.widget.ImageButton.setScaleY()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(174)

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

ImageButton.setScaleY介绍

暂无

代码示例

代码示例来源:origin: nickbutcher/plaid

private void showFab() {
  fab.setAlpha(0f);
  fab.setScaleX(0f);
  fab.setScaleY(0f);
  fab.setTranslationY(fab.getHeight() / 2);
  fab.animate()
      .alpha(1f)
      .scaleX(1f)
      .scaleY(1f)
      .translationY(0f)
      .setDuration(300L)
      .setInterpolator(AnimUtils.getLinearOutSlowInInterpolator(this))
      .start();
}

代码示例来源:origin: 6ag/BaoKanAndroid

@Override
  public void onSpringUpdate(Spring spring) {
    float value = (float) spring.getCurrentValue();
    float scale = value * 2f;
    mCollectionButton.setScaleX(scale);
    mCollectionButton.setScaleY(scale);
  }
});

代码示例来源:origin: 6ag/BaoKanAndroid

@Override
  public void onSpringUpdate(Spring spring) {
    float value = (float) spring.getCurrentValue();
    float scale = value * 2f;
    mCollectionButton.setScaleX(scale);
    mCollectionButton.setScaleY(scale);
  }
});

代码示例来源:origin: stackoverflow.com

private void setupBalloon(ImageButton b, int i) {
  int imageId = (int)(Math.random() * images.length);
  LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,
      LinearLayout.LayoutParams.WRAP_CONTENT);
  b.setLayoutParams(params);
  b.setImageResource(images[imageId]);
  b.setBackgroundColor(Color.TRANSPARENT);
  b.setScaleX(0.4f);
  b.setScaleY(0.4f);
  b.setX((float) (Math.random() * (width - b.getWidth())));
  b.setY((float) (Math.random() * (height - b.getHeight())));
  b.setVisibility(View.VISIBLE);
}

代码示例来源:origin: WangDaYeeeeee/Mysplash

@Override
  protected void applyTransformation(float interpolatedTime, Transformation t) {
    super.applyTransformation(interpolatedTime, t);
    float scale = fromScale + (toScale - fromScale) * interpolatedTime;
    float alpha = fromAlpha + (0 - fromAlpha) * interpolatedTime;
    bellBtn.setScaleX(scale);
    bellBtn.setScaleY(scale);
    bellBtn.setAlpha(alpha);
    dot.setAlpha(alpha);
  }
}

代码示例来源:origin: WangDaYeeeeee/Mysplash

@Override
  protected void applyTransformation(float interpolatedTime, Transformation t) {
    super.applyTransformation(interpolatedTime, t);
    float scale = (float) (0.5 + 0.5 * interpolatedTime);
    float alpha = 0 + 1 * interpolatedTime;
    bellBtn.setScaleX(scale);
    bellBtn.setScaleY(scale);
    bellBtn.setAlpha(alpha);
    dot.setAlpha(alpha);
  }
}

代码示例来源:origin: NightscoutFoundation/xDrip

((ViewGroup.MarginLayoutParams) btnCancel.getLayoutParams()).rightMargin = 0;
btnApprove.setScaleX(button_scale_factor);
btnApprove.setScaleY(button_scale_factor);
btnCancel.setScaleX(button_scale_factor);
btnCancel.setScaleY(button_scale_factor);
btnInsulinDose.setScaleX(button_scale_factor);
btnCarbohydrates.setScaleX(button_scale_factor);
btnCarbohydrates.setScaleY(button_scale_factor);
btnBloodGlucose.setScaleX(button_scale_factor);
btnBloodGlucose.setScaleY(button_scale_factor);
btnInsulinDose.setScaleY(button_scale_factor);
btnTime.setScaleX(button_scale_factor);
btnTime.setScaleY(button_scale_factor);

代码示例来源:origin: marzika/Snapprefs

upload.setScaleY((float) 0.65);
upload.setOnClickListener(new View.OnClickListener() {
  @Override

代码示例来源:origin: jamorham/xDrip-plus

((ViewGroup.MarginLayoutParams) btnCancel.getLayoutParams()).rightMargin = 0;
btnApprove.setScaleX(button_scale_factor);
btnApprove.setScaleY(button_scale_factor);
btnCancel.setScaleX(button_scale_factor);
btnCancel.setScaleY(button_scale_factor);
btnInsulinDose.setScaleX(button_scale_factor);
btnCarbohydrates.setScaleX(button_scale_factor);
btnCarbohydrates.setScaleY(button_scale_factor);
btnBloodGlucose.setScaleX(button_scale_factor);
btnBloodGlucose.setScaleY(button_scale_factor);
btnInsulinDose.setScaleY(button_scale_factor);
btnTime.setScaleX(button_scale_factor);
btnTime.setScaleY(button_scale_factor);

代码示例来源:origin: marzika/Snapprefs

textButton.setImageDrawable(mResources.getDrawable(R.drawable.triangle));
textButton.setScaleX((float) 0.4);
textButton.setScaleY((float) 0.4);
textButton.setOnClickListener(new View.OnClickListener() {
  boolean shouldHideOptions = true;
speed.setImageDrawable(mResources.getDrawable(R.drawable.speed));
speed.setScaleX((float) 0.4);
speed.setScaleY((float) 0.4);
speed.setOnClickListener(new View.OnClickListener() {
  @Override
weather.setImageDrawable(mResources.getDrawable(R.drawable.weather));
weather.setScaleX((float) 0.4);
weather.setScaleY((float) 0.4);
weather.setOnClickListener(new View.OnClickListener() {
  @Override
location.setImageDrawable(mResources.getDrawable(R.drawable.location));
location.setScaleX((float) 0.4);
location.setScaleY((float) 0.4);
location.setOnClickListener(new View.OnClickListener() {
  @Override

相关文章

ImageButton类方法