本文整理了Java中android.widget.ImageView.getAlpha()
方法的一些代码示例,展示了ImageView.getAlpha()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.getAlpha()
方法的具体详情如下:
包路径:android.widget.ImageView
类名称:ImageView
方法名:getAlpha
暂无
代码示例来源:origin: fython/MaterialStepperView
mSummaryColorAnimator.start();
if (mErrorIconView.getAlpha() < 1F) {
if (mPointAnimator != null) mPointAnimator.cancel();
mPointAnimator = mPointFrame.animate().alpha(0F).setDuration(mAnimationDuration);
代码示例来源:origin: omadahealth/SlidePager
@Override
public void onAnimationEnd(Animator animation) {
// resets the checkmark
if (!mShowCheckMark) {
mCheckMark.setAlpha(0f);
}
Log.d("alhpa", "" + mCheckMark.getAlpha());
}
代码示例来源:origin: ZhangQinhao/MONKOVEL
private void hideSlide() {
if (ivSlider.getAlpha() > 0) {
if (slideIn != null && slideIn.isRunning()) {
slideIn.cancel();
}
if (slideOut == null) {
slideOut = ObjectAnimator.ofFloat(ivSlider, "alpha", ivSlider.getAlpha(), 0f);
slideOut.setDuration((long) (SLIDE_ANIM_TIME * ivSlider.getAlpha()));
}
if (!slideOut.isRunning()) {
slideOut.start();
}
}
}
代码示例来源:origin: ZhangQinhao/MONKOVEL
private void showSlide() {
if (ivSlider.getAlpha() < 1) {
if (slideOut != null && slideOut.isRunning()) {
slideOut.cancel();
}
if (slideIn == null) {
slideIn = ObjectAnimator.ofFloat(ivSlider, "alpha", ivSlider.getAlpha(), 1f);
slideIn.setDuration((long) (SLIDE_ANIM_TIME * (1f - ivSlider.getAlpha())));
}
if (!slideIn.isRunning()) {
slideIn.start();
}
}
}
代码示例来源:origin: tomahawk-player/tomahawk-android
@Override
public void onSuccess() {
AnimationUtils.fade(imageViewToFadeIn, imageViewToFadeIn.getAlpha(),
1f, AnimationUtils.DURATION_PLAYBACKFRAGMENT_BG, true, null);
AnimationUtils.fade(imageViewToFadeOut, imageViewToFadeOut.getAlpha(),
0f, AnimationUtils.DURATION_PLAYBACKFRAGMENT_BG, false,
new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
}
@Override
public void onAnimationEnd(Animator animation) {
imageViewToFadeOut.setImageDrawable(null);
}
@Override
public void onAnimationCancel(Animator animation) {
}
@Override
public void onAnimationRepeat(Animator animation) {
}
});
}
代码示例来源:origin: zzyyppqq/DrawingBoard
@Override
public void onUndoRedo(boolean isUndo, boolean isRedo) {
Log.d("UNDO", "isUndo:" + isUndo + ",isRedo:" + isRedo);
if (isUndo) {
if (ivUndo.getAlpha() < 1f) {
ivUndo.setAlpha(1f);
}
} else {
if (ivUndo.getAlpha() == 1f) {
ivUndo.setAlpha(0.5f);
}
}
if (isRedo) {
if (ivRedo.getAlpha() < 1f) {
ivRedo.setAlpha(1f);
}
} else {
if (ivRedo.getAlpha() == 1f) {
ivRedo.setAlpha(0.5f);
}
}
}
});
代码示例来源:origin: omadahealth/SlidePager
/**
* Animates the display and hiding of {@link ViewProgressBinding#checkMark}
*
* @param show True to show, false to hide
*/
public void showCheckMark(boolean show) {
AnimatorSet set = new AnimatorSet();
//Immediately remove them
if (!show) {
mBinding.checkMark.setAlpha(0f);
return;
}
//Return if sideView already shown
if (mBinding.checkMark.getAlpha() == 1f) {
return;
}
float start = 0;
float end = 1f;
set.playTogether(Glider.glide(Skill.QuadEaseInOut, EASE_IN_DURATION, ObjectAnimator.ofFloat(mBinding.checkMark, "alpha", start, end)));
set.setDuration(EASE_IN_DURATION);
set.start();
}
代码示例来源:origin: stackoverflow.com
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ImageView imageView = (ImageView) findViewById(R.id.image);
float alpha = imageView.getAlpha();
if (alpha == 0f) {
imageView.animate().alpha(1f).setDuration(500);
} else if (alpha == 1f) {
imageView.animate().alpha(0f).setDuration(500);
}
}
});
代码示例来源:origin: hitherejoe/LeanbackCards
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
mAttachedToWindow = true;
ImageView mImageView = mPreviewCard.getImageView();
if (mImageView.getAlpha() == 0) fadeIn();
}
代码示例来源:origin: gigabytedevelopers/FireFiles
@Override
protected void onPostExecute(Bitmap result) {
if (isCancelled()) {
result = null;
}
if (mIconThumb.getTag() == this && result != null) {
mIconThumb.setTag(null);
mIconThumb.setImageBitmap(result);
mIconMimeBackground.setVisibility(View.GONE);
float alpha = mIconMime.getAlpha();
mIconMime.animate().alpha(0f).start();
mIconThumb.setAlpha(0f);
mIconThumb.animate().alpha(alpha).start();
}
}
}
代码示例来源:origin: stackoverflow.com
if(listImg.getAlpha()==1)
代码示例来源:origin: omadahealth/SlidePager
if (mCheckMark.getAlpha() == 1f) {
return;
代码示例来源:origin: sregg/spotify-tv
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
mAttachedToWindow = true;
if (mImageView.getAlpha() == 0) fadeIn();
BusProvider.getInstance().register(this);
}
代码示例来源:origin: vogellacompany/codeexamples-android
if (aniView.getAlpha() > 0) {
dest = 0;
代码示例来源:origin: andforce/iBeebo
view.setImageBitmap(bitmap);
view.setTag(urlKey);
if (view.getAlpha() != 1.0f) {
view.setAlpha(1.0f);
代码示例来源:origin: skydoves/ColorPickerView
/**
* changes palette drawable manually.
*
* @param drawable palette drawable.
*/
public void setPaletteDrawable(@NonNull Drawable drawable) {
removeView(palette);
palette = new ImageView(getContext());
paletteDrawable = drawable;
palette.setImageDrawable(paletteDrawable);
addView(palette);
removeView(selector);
addView(selector);
if (flagView != null) {
removeView(flagView);
addView(flagView);
}
if (!VISIBLE_FLAG) {
VISIBLE_FLAG = true;
if (selector != null) {
alpha_selector = selector.getAlpha();
selector.setAlpha(0.0f);
}
if (flagView != null) {
alpha_flag = flagView.getAlpha();
flagView.setAlpha(0.0f);
}
}
}
代码示例来源:origin: skydoves/ColorPickerPreference
public void setPaletteDrawable(Drawable drawable) {
removeView(palette);
palette = new ImageView(getContext());
paletteDrawable = drawable;
palette.setImageDrawable(paletteDrawable);
addView(palette);
removeView(selector);
addView(selector);
if (flagView != null) {
removeView(flagView);
addView(flagView);
}
// hide selector & flagView
if (!flagSetPalette) {
flagSetPalette = true;
if (selector != null) {
alpha_selector = selector.getAlpha();
selector.setAlpha(0.0f);
}
if (flagView != null) {
alpha_flag = flagView.getAlpha();
flagView.setAlpha(0.0f);
}
}
}
代码示例来源:origin: zzyyppqq/DrawingBoard
break;
case R.id.iv_eraser:
if (ivEraser.getAlpha() < 1f) {
ivEraser.setAlpha(1f);
ivBrush.setAlpha(0.5f);
break;
case R.id.iv_brush:
if (ivBrush.getAlpha() < 1f) {
ivBrush.setAlpha(1f);
ivEraser.setAlpha(0.5f);
代码示例来源:origin: tomahawk-player/tomahawk-android
final ImageView imageViewToFadeIn;
final ImageView imageViewToFadeOut;
if (bgAltImageView.getAlpha() < bgImageView.getAlpha()) {
imageViewToFadeIn = bgAltImageView;
imageViewToFadeOut = bgImageView;
代码示例来源:origin: andforce/iBeebo
view.getProgressBar().setVisibility(View.INVISIBLE);
if (view.getImageView().getAlpha() != 1.0f) {
view.getImageView().setAlpha(1.0f);
内容来源于网络,如有侵权,请联系作者删除!