android.widget.ImageView.setScaleX()方法的使用及代码示例

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

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

ImageView.setScaleX介绍

暂无

代码示例

代码示例来源:origin: arimorty/floatingsearchview

@Override
  public void onAnimationEnd(Animator animation) {
    //restore normal state
    mLeftAction.setScaleX(1.0f);
    mLeftAction.setScaleY(1.0f);
    mLeftAction.setAlpha(1.0f);
    mLeftAction.setVisibility(View.INVISIBLE);
  }
});

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

@Override
public void setScaleX(float scaleX) {
  super.setScaleX(scaleX);
  invalidateParentIfNeeded();
  fireOnTransformationChangedListener();
}

代码示例来源:origin: frogermcs/InstaMaterial

holder.vBgLike.setAlpha(1f);
holder.ivLike.setScaleY(0.1f);
holder.ivLike.setScaleX(0.1f);

代码示例来源:origin: frogermcs/InstaMaterial

private void loadThumbnailPhoto() {
  ivPhoto.setScaleX(0);
  ivPhoto.setScaleY(0);
  Picasso.with(this)
      .load(photoUri)
      .centerCrop()
      .resize(photoSize, photoSize)
      .into(ivPhoto, new Callback() {
        @Override
        public void onSuccess() {
          ivPhoto.animate()
              .scaleX(1.f).scaleY(1.f)
              .setInterpolator(new OvershootInterpolator())
              .setDuration(400)
              .setStartDelay(200)
              .start();
        }
        @Override
        public void onError() {
        }
      });
}

代码示例来源:origin: fython/MaterialStepperView

mPointAnimator = mPointFrame.animate().alpha(0F).setDuration(mAnimationDuration);
mPointAnimator.start();
mErrorIconView.setScaleX(0.6F);
mErrorIconView.setScaleY(0.6F);
if (mErrorIconAnimator != null) mErrorIconAnimator.cancel();

代码示例来源:origin: arimorty/floatingsearchview

.animate(mSearchInputParent).translationX(0).get();
mLeftAction.setScaleX(0.5f);
mLeftAction.setScaleY(0.5f);
mLeftAction.setAlpha(0.0f);

代码示例来源:origin: google/santa-tracker-android

@Override
  public void onAnimationUpdate(ValueAnimator valueAnimator) {
    float scale = (float) valueAnimator.getAnimatedValue("scale");
    star.setScaleX(scale);
    star.setScaleY(scale);
  }
},

代码示例来源:origin: pili-engineering/PLDroidShortVideo

@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
  float scale = ((float) (min + (progress * step))) / 100;
  mSizeImage.setScaleX(scale);
  mSizeImage.setScaleY(scale);
  if (mOnPaintSelectorListener != null) {
    mOnPaintSelectorListener.onPaintSizeSelected((int) (PAINT_MAX_SIZE * scale));
  }
}

代码示例来源:origin: recruit-lifestyle/FloatingView

/**
 * 削除アイコンの大きさを即時に変更します。
 *
 * @param isEnter 領域に入った場合はtrue.そうでない場合はfalse
 */
private void setScaleTrashIconImmediately(boolean isEnter) {
  cancelScaleTrashAnimation();
  mActionTrashIconView.setScaleX(isEnter ? mActionTrashIconMaxScale : 1.0f);
  mActionTrashIconView.setScaleY(isEnter ? mActionTrashIconMaxScale : 1.0f);
}

代码示例来源:origin: iielse/ImageWatcher

if (scaleResultX < MIN_SCALE) scaleResultX = MIN_SCALE;
else if (scaleResultX > MAX_SCALE) scaleResultX = MAX_SCALE;
iSource.setScaleX(scaleResultX);
float scaleResultY = vsTouchScale.scaleY - changedScale;
if (scaleResultY < MIN_SCALE) scaleResultY = MIN_SCALE;

代码示例来源:origin: iielse/ImageWatcher

/**
 * 处理响应退出图片查看
 */
private void handleExitGesture(MotionEvent e2, MotionEvent e1) {
  if (iSource == null) return;
  ViewState vsExit = ViewState.read(iSource, ViewState.STATE_EXIT);
  ViewState vsDefault = ViewState.read(iSource, ViewState.STATE_DEFAULT);
  if (vsExit == null || vsDefault == null) return;
  mExitRef = 1;
  final float moveY = e2.getY() - e1.getY();
  final float moveX = e2.getX() - e1.getX();
  if (moveY > 0) mExitRef -= moveY / (mHeight / 2);
  if (mExitRef < 0) mExitRef = 0;
  setBackgroundColor(mColorEvaluator.evaluate(mExitRef, 0x00000000, 0xFF000000));
  final float exitScale = MIN_SCALE + (vsExit.scaleX - MIN_SCALE) * mExitRef;
  iSource.setScaleX(exitScale);
  iSource.setScaleY(exitScale);
  final float exitTrans = vsDefault.translationX + (vsExit.translationX - vsDefault.translationX) * mExitRef;
  iSource.setTranslationX(exitTrans + moveX);
  iSource.setTranslationY(vsExit.translationY + moveY);
}

代码示例来源:origin: armcha/LuseenBottomNavigation

container.setBackgroundColor(bottomNavigationItems.get(index).getColor());
title.setTextColor(itemActiveColorWithoutColoredBackground);
icon.setScaleX((float) 1.1);
icon.setScaleY((float) 1.1);

代码示例来源:origin: fafaldo/FABToolbar

@Override
  public void onAnimationUpdate(ValueAnimator valueAnimator) {
    float valFloat = (Float) valueAnimator.getAnimatedValue();
    fab.setScaleX(valFloat / startRadius);
    fab.setScaleY(valFloat / startRadius);
  }
});

代码示例来源:origin: xu649526275/MyMVPDemo

@Override
public void onUIReset(PtrFrameLayout frame) {
  //Content 重新回到顶部, Header 消失,整个下拉刷新过程完全结束以后,重置 View 。
//     Log.v("dalongs1","重置");
  title.setText("下拉刷新");
  title.setVisibility(View.VISIBLE);
  progressBar.setVisibility(View.INVISIBLE);
  img.setVisibility(View.VISIBLE);
  img.setAlpha(0f);
  img.setScaleX(0.0f);
  img.setScaleY(0.0f);
}

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

final ImageView iv = (ImageView) findViewById(R.id.imageView);
 ViewTreeObserver vto = iv.getViewTreeObserver();
 vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
   @Override
   public void onGlobalLayout() {
     // Start at 60
     Log.d("test", "Before"+String.valueOf(iv.getWidth()* iv.getScaleX()));
     iv.setScaleX((float) .5);
     // Still at 60 after scale
     Log.d("test", "After"+String.valueOf(iv.getWidth()* iv.getScaleX()));
   }
 });

代码示例来源:origin: 3llomi/RecordView

public void resetSmallMic() {
  smallBlinkingMic.setAlpha(1.0f);
  smallBlinkingMic.setScaleX(1.0f);
  smallBlinkingMic.setScaleY(1.0f);
}

代码示例来源:origin: kot32go/KSimpleLibrary

@Override
public void loadTips(View headerView, int progress) {
  float scaleRatio = ((float) progress) / 100;
  people.setScaleX(scaleRatio);
  people.setScaleY(scaleRatio);
  box.setScaleX(scaleRatio);
  box.setScaleY(scaleRatio);
  people.setTranslationX(tx * scaleRatio);
  box.setTranslationY(ty * scaleRatio);
  tips.setText("上拉加载...");
  frameAnimation.stop();
}

代码示例来源:origin: goodbranch/ScreenCapture

@Override
 public void onAnimationUpdate(ValueAnimator animation) {
  float t = (Float) animation.getAnimatedValue();
  float scaleT = (SCREENSHOT_DROP_IN_MIN_SCALE + mBgPaddingScale)
    - t * (SCREENSHOT_DROP_IN_MIN_SCALE - SCREENSHOT_FAST_DROP_OUT_MIN_SCALE);
  mBackgroundView.setAlpha((1f - t) * BACKGROUND_ALPHA);
  mScreenshotView.setAlpha(1f - t);
  mScreenshotView.setScaleX(scaleT);
  mScreenshotView.setScaleY(scaleT);
 }
});

代码示例来源:origin: safetysystemtechnology/audio-recorder-button

public void unRevealImageView() {
  this.mChronometer.stop();
  this.mImageView.setScaleX(1f);
  this.mImageView.setScaleY(1f);
  this.requestLayout();
}

代码示例来源:origin: maning0303/MNSwipeToLoadDemo

@Override
public void onPrepare() {
  llRefresh.setAlpha(0.3f);
  ivRefresh.setScaleX(0.4f);
  ivRefresh.setScaleY(0.4f);
  if (!mAnimDrawable.isRunning()) {
    mAnimDrawable.start();
  }
}

相关文章

ImageView类方法