本文整理了Java中android.widget.ImageView.removeCallbacks()
方法的一些代码示例,展示了ImageView.removeCallbacks()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.removeCallbacks()
方法的具体详情如下:
包路径:android.widget.ImageView
类名称:ImageView
方法名:removeCallbacks
暂无
代码示例来源:origin: commonsguy/cw-omnibus
private void onHover(MotionEvent event, @StringRes final int message,
final View anchor) {
Runnable hover=hoverTimers.get(anchor.getId());
if (hover==null &&
(event.getAction()==MotionEvent.ACTION_HOVER_ENTER ||
event.getAction()==MotionEvent.ACTION_HOVER_MOVE)) {
hover=new Runnable() {
@Override
public void run() {
showTooltip(message);
}
};
hoverTimers.put(anchor.getId(), hover);
thumbnailLarge.postDelayed(hover, TOOLTIP_DELAY);
}
else if (hover!=null &&
event.getAction()==MotionEvent.ACTION_HOVER_EXIT) {
thumbnailLarge.removeCallbacks(hover);
hoverTimers.remove(anchor.getId());
}
}
代码示例来源:origin: seven332/EhViewer
private void fingerprintError(boolean unrecoverable) {
// Do not decrease mRetryTimes here since Android system will handle it :)
mFingerprintIcon.setImageResource(R.drawable.fingerprint_error);
mFingerprintIcon.removeCallbacks(mResetFingerprintRunnable);
if (unrecoverable) {
mFingerprintIcon.postDelayed(new Runnable() {
@Override
public void run() {
mFingerprintIcon.setVisibility(View.INVISIBLE);
}
}, ERROR_TIMEOUT_MILLIS);
} else {
mFingerprintIcon.postDelayed(mResetFingerprintRunnable, ERROR_TIMEOUT_MILLIS);
}
}
}
代码示例来源:origin: huazhiyuan2008/RecyclerViewCardGallery
private void notifyBackgroundChange() {
if (mLastPos == mCardScaleHelper.getCurrentItemPos()) return;
mLastPos = mCardScaleHelper.getCurrentItemPos();
final int resId = mList.get(mCardScaleHelper.getCurrentItemPos());
mBlurView.removeCallbacks(mBlurRunnable);
mBlurRunnable = new Runnable() {
@Override
public void run() {
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), resId);
ViewSwitchUtils.startSwitchBackgroundAnim(mBlurView, BlurBitmapUtils.getBlurBitmap(mBlurView.getContext(), bitmap, 15));
}
};
mBlurView.postDelayed(mBlurRunnable, 500);
}
代码示例来源:origin: wutongke/ViewPagerIndicator
@Override
protected void onDestroy() {
super.onDestroy();
ReuseBitmapUtil.clear();
bitmaps = null;
subscription.unsubscribe();
imageView.removeCallbacks(setImageDrawableRunnable);
imageView.removeCallbacks(createBitmapRunnable);
}
代码示例来源:origin: benoberkfell/android-fingerprint-demo
@Override
public void onDismiss(final DialogInterface dialog) {
super.onDismiss(dialog);
fingerprintIconImageView.removeCallbacks(resetFingerprintHint);
}
代码示例来源:origin: stackoverflow.com
public class MyRunnable implements Runnable {
private ImageView imageView;
private boolean exit = false;
public MyRunnable(ImageView n) {
imageView = n;
}
private void setExit() {
exit = true;
}
@Override
public void run() {
if (exit) {
imageView.removeCallbacks(null);
imageView = null;
return;
}
imageView.setImageResource(pics[count++%5]);
imageView.postDelayed(this, 1000);
}
}
代码示例来源:origin: sorz/TinyKeePass
public void stop() {
if (cancellationSignal != null)
cancellationSignal.cancel();
textFingerprintStatus.removeCallbacks(resetErrorTextRunnable);
imageFingerprintIcon.removeCallbacks(authenticationErrorRunnable);
}
代码示例来源:origin: benoberkfell/android-fingerprint-demo
@Override
public void onError(String errorString, boolean isHardError) {
fingerprintIconImageView.removeCallbacks(resetFingerprintHint);
fingerprintStatusTextView.setTextColor(ContextCompat.getColor(getActivity(),R.color.warning_color));
fingerprintStatusTextView.setText(errorString);
fingerprintIconImageView.setImageDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.ic_fingerprint_error));
if (!isHardError) {
fingerprintIconImageView.postDelayed(resetFingerprintHint, ERROR_TIMEOUT_MS);
}
}
代码示例来源:origin: lynfogeek/conference-app
public void stopAnimation() {
mIsAnimating = false;
mLoading = false;
mRefreshButton.setEnabled(true);
mLoadingFrame.setVisibility(View.GONE);
mLoadingFrame.setBackgroundColor(Color.WHITE);
if (mRefreshButton.getAnimation() != null) {
mRefreshButton.getAnimation().cancel();
}
if (mTabView.getAnimation() != null) {
mTabView.getAnimation().cancel();
mTabView.setAlpha(1f);
}
mIsAnimating = false;
if (mCheckAnimation != null) {
mBugDroid.removeCallbacks(mCheckAnimation);
mCheckAnimation = null;
}
}
代码示例来源:origin: benoberkfell/android-fingerprint-demo
@Override
@RequiresApi(M)
public void onSuccess(final FingerprintManagerCompat.CryptoObject cryptoObject) {
fingerprintIconImageView.removeCallbacks(resetFingerprintHint);
fingerprintStatusTextView.setText(getString(R.string.fingerprint_success));
fingerprintStatusTextView.setTextColor(ContextCompat.getColor(getActivity(),R.color.success_color));
fingerprintIconImageView.setImageDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.ic_fingerprint_success));
fingerprintStatusTextView.postDelayed(new Runnable() {
@Override
public void run() {
dismiss();
if (callback != null) {
callback.onAuthenticated(new Signer(cryptoObject));
}
}
}, SUCCESS_TIMEOUT_MS);
}
内容来源于网络,如有侵权,请联系作者删除!