Search in sources :

Example 16 with AutoTransition

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);
}
Also used : AutoTransition(android.transition.AutoTransition) Transition(android.transition.Transition) AutoTransition(android.transition.AutoTransition) AccelerateDecelerateInterpolator(android.view.animation.AccelerateDecelerateInterpolator)

Example 17 with AutoTransition

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);
    }
}
Also used : AutoTransition(android.transition.AutoTransition)

Example 18 with AutoTransition

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);
    }
}
Also used : AutoTransition(android.transition.AutoTransition) ColorStateList(android.content.res.ColorStateList) TextView(android.widget.TextView) ImageView(android.widget.ImageView)

Aggregations

AutoTransition (android.transition.AutoTransition)18 Transition (android.transition.Transition)10 TextView (android.widget.TextView)7 View (android.view.View)6 ChangeBounds (android.transition.ChangeBounds)5 Fade (android.transition.Fade)5 ImageView (android.widget.ImageView)5 ListView (android.widget.ListView)5 Scene (android.transition.Scene)4 TransitionSet (android.transition.TransitionSet)4 ViewTreeObserver (android.view.ViewTreeObserver)4 AdapterView (android.widget.AdapterView)4 LinearLayout (android.widget.LinearLayout)4 AccelerateDecelerateInterpolator (android.view.animation.AccelerateDecelerateInterpolator)3 ColorStateList (android.content.res.ColorStateList)2 Intent (android.content.Intent)1 DataSetObserver (android.database.DataSetObserver)1 CardView (android.support.v7.widget.CardView)1 DecelerateInterpolator (android.view.animation.DecelerateInterpolator)1 Alarm (com.tevinjeffrey.rutgersct.services.Alarm)1