@Override public void onStop() { fadee.removeCallbacks(this); super.onStop(); }
@Override public void onStop() { fadee.removeCallbacks(this); super.onStop(); }
/** * Stops periodic updates of the {@link TextView}. Must be called from the application's main * thread. */ public final void stop() { if (!started) { return; } started = false; player.removeListener(this); textView.removeCallbacks(this); }
@Override public void onResult(Bundle data, String sessionId, MediaSessionStatus sessionStatus) { transcript.removeCallbacks(this); run(); }
@Override protected void onDestroy() { super.onDestroy(); flag = true; tvSkip.removeCallbacks(runnable); ButterKnife.unbind(this); } }
@Override public void onResult(Bundle data, String sessionId, MediaSessionStatus sessionStatus) { transcript.removeCallbacks(this); run(); }
@SuppressLint("SetTextI18n") protected final void updateAndPost() { textView.setText(getDebugString()); textView.removeCallbacks(this); textView.postDelayed(this, REFRESH_INTERVAL_MS); }
/** * Stops periodic updates of the {@link TextView}. Must be called from the application's main * thread. */ public void stop() { if (!started) { return; } started = false; player.removeListener(this); textView.removeCallbacks(this); }
/** * Show an error on the UI using {@link #mIcon} and {@link #mErrorTextView} */ private void showError(CharSequence error) { mIcon.setImageResource(R.drawable.ic_fingerprint_error); mErrorTextView.setText(error); mErrorTextView.setTextColor( mErrorTextView.getResources().getColor(R.color.warning_color, null)); mErrorTextView.removeCallbacks(mResetErrorTextRunnable); mErrorTextView.postDelayed(mResetErrorTextRunnable, ERROR_TIMEOUT_MILLIS); }
private void showError(CharSequence error) { mIcon.setImageResource(R.drawable.ic_fingerprint_error); mErrorTextView.setText(error); mErrorTextView.setTextColor( mErrorTextView.getResources().getColor(R.color.warning_color, null)); mErrorTextView.removeCallbacks(mResetErrorTextRunnable); mErrorTextView.postDelayed(mResetErrorTextRunnable, ERROR_TIMEOUT_MILLIS); }
@Override public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) { mErrorTextView.removeCallbacks(mResetErrorTextRunnable); mIcon.setImageResource(R.drawable.ic_fingerprint_success); mErrorTextView.setTextColor( mErrorTextView.getResources().getColor(R.color.success_color, null)); mErrorTextView.setText( mErrorTextView.getResources().getString(R.string.fingerprint_success)); mIcon.postDelayed(new Runnable() { @Override public void run() { mCallback.onAuthenticated(); } }, SUCCESS_DELAY_MILLIS); }
/** * Called by {@link FingerprintManager} if the authentication succeeded. */ @Override public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) { mErrorTextView.removeCallbacks(mResetErrorTextRunnable); mIcon.setImageResource(R.drawable.ic_fingerprint_success); mErrorTextView.setTextColor( mErrorTextView.getResources().getColor(R.color.success_color, null)); mErrorTextView.setText( mErrorTextView.getResources().getString(R.string.pin_code_fingerprint_success)); mIcon.postDelayed(new Runnable() { @Override public void run() { mCallback.onAuthenticated(); } }, SUCCESS_DELAY_MILLIS); }
@SuppressLint("SetTextI18n") private void updateAndPost() { textView.setText(getPlayerStateString() + getPlayerWindowIndexString() + getPreferredDisplayModeId() + getVideoString() + getAudioString()); textView.removeCallbacks(this); textView.postDelayed(this, REFRESH_INTERVAL_MS); }
/** * Stops periodic updates of the {@link TextView}. * <p> * Should be called from the application's main thread. */ public void stop() { textView.removeCallbacks(this); }
@Override public void unscheduleDrawable(@NonNull Drawable who, @NonNull Runnable what) { view.removeCallbacks(what); } }
@Override public void notifyViewChange() { if (target == null) return; final TextView t = target.get(); if (isViewSet && t != null && spanned != null) { //这儿会有索引越界 t.removeCallbacks(updateRunable); t.postDelayed(updateRunable, 200); } }
private void showError(CharSequence error) { mIcon.setImageResource(R.drawable.ic_fingerprint_error_pf); mErrorTextView.setText(error); mErrorTextView.setTextColor( mErrorTextView.getResources().getColor(R.color.warning_color, null)); mErrorTextView.removeCallbacks(mResetErrorTextRunnable); mErrorTextView.postDelayed(mResetErrorTextRunnable, ERROR_TIMEOUT_MILLIS); }
private void showError(CharSequence error) { mIcon.setImageResource(R.drawable.ic_fingerprint_error); mErrorTextView.setText(error); mErrorTextView.setTextColor( mErrorTextView.getResources().getColor(R.color.warning_color, null)); mErrorTextView.removeCallbacks(mResetErrorTextRunnable); mErrorTextView.postDelayed(mResetErrorTextRunnable, ERROR_TIMEOUT_MILLIS); }
private void showError(CharSequence error) { if (getActivity() == null) return; mFingerprintIcon.setImageResource(R.drawable.ic_fingerprint_error); mFingerprintStatus.setText(error); mFingerprintStatus.setTextColor(ContextCompat.getColor(getActivity(), R.color.warning_color)); mFingerprintStatus.removeCallbacks(mResetErrorTextRunnable); mFingerprintStatus.postDelayed(mResetErrorTextRunnable, ERROR_TIMEOUT_MILLIS); }
public void stop() { if (cancellationSignal != null) cancellationSignal.cancel(); textFingerprintStatus.removeCallbacks(resetErrorTextRunnable); imageFingerprintIcon.removeCallbacks(authenticationErrorRunnable); }