use of android.transition.AutoTransition in project file.io-app by rumaan.
the class MainActivity method updateLinkText.
void updateLinkText(String link) {
linkTextView.setText(link);
Transition transition = new AutoTransition().setDuration(500).setStartDelay(300).setInterpolator(new AccelerateDecelerateInterpolator());
TransitionManager.beginDelayedTransition(rootView, transition);
linkTextView.setVisibility(View.VISIBLE);
}
use of android.transition.AutoTransition in project samourai-wallet-android by Samourai-Wallet.
the class TxDetailsActivity method toggleUnits.
private void toggleUnits() {
TransitionManager.beginDelayedTransition((ViewGroup) btcUnit.getRootView().getRootView(), new AutoTransition());
if (btcUnit.getText().equals("BTC")) {
btcUnit.setText("sat");
amount.setText(SatDisplayAmount);
} else {
btcUnit.setText("BTC");
amount.setText(BTCDisplayAmount);
}
}
use of android.transition.AutoTransition in project android_packages_apps_Settings by omnirom.
the class ImportancePreference method setImportanceSummary.
void setImportanceSummary(ViewGroup parent, int importance, boolean fromUser) {
if (fromUser) {
AutoTransition transition = new AutoTransition();
transition.setDuration(BUTTON_ANIM_TIME_MS);
TransitionManager.beginDelayedTransition(parent, transition);
}
ColorStateList colorAccent = getAccentTint();
ColorStateList colorNormal = getRegularTint();
if (importance >= IMPORTANCE_DEFAULT) {
parent.findViewById(R.id.silence_summary).setVisibility(GONE);
((ImageView) parent.findViewById(R.id.silence_icon)).setImageTintList(colorNormal);
((TextView) parent.findViewById(R.id.silence_label)).setTextColor(colorNormal);
((ImageView) parent.findViewById(R.id.alert_icon)).setImageTintList(colorAccent);
((TextView) parent.findViewById(R.id.alert_label)).setTextColor(colorAccent);
parent.findViewById(R.id.alert_summary).setVisibility(VISIBLE);
} else {
parent.findViewById(R.id.alert_summary).setVisibility(GONE);
((ImageView) parent.findViewById(R.id.alert_icon)).setImageTintList(colorNormal);
((TextView) parent.findViewById(R.id.alert_label)).setTextColor(colorNormal);
((ImageView) parent.findViewById(R.id.silence_icon)).setImageTintList(colorAccent);
((TextView) parent.findViewById(R.id.silence_label)).setTextColor(colorAccent);
parent.findViewById(R.id.silence_summary).setVisibility(VISIBLE);
}
}
Aggregations