Search in sources :

Example 61 with ChangeBounds

use of android.transition.ChangeBounds in project platform_frameworks_base by android.

the class Demo1 method sendMessage.

public void sendMessage(View view) {
    if (mFirstTime) {
        mFirstTime = false;
        TransitionSet transition = new TransitionSet();
        transition.addTransition(new Fade().addTarget(R.id.resultsText).addTarget(R.id.resultsList)).addTransition(new ChangeBounds().addTarget(R.id.searchContainer));
        mTransitionManager = new TransitionManager();
        mTransitionManager.setTransition(mSearchScreen, transition);
        mTransitionManager.setTransition(mResultsScreen, transition);
    }
    if (mCurrentScene == mResultsScreen) {
        mTransitionManager.transitionTo(mSearchScreen);
        mCurrentScene = mSearchScreen;
    } else {
        mTransitionManager.transitionTo(mResultsScreen);
        mCurrentScene = mResultsScreen;
    }
}
Also used : TransitionManager(android.transition.TransitionManager) TransitionSet(android.transition.TransitionSet) ChangeBounds(android.transition.ChangeBounds) Fade(android.transition.Fade)

Example 62 with ChangeBounds

use of android.transition.ChangeBounds in project native-navigation by airbnb.

the class AutoSharedElementCallback method getDefaultTransition.

@TargetApi(TARGET_API)
private Transition getDefaultTransition() {
    TransitionSet set = new TransitionSet();
    set.addTransition(new ChangeBounds());
    set.addTransition(new Fade());
    set.addTransition(new ChangeImageTransform());
    set.setInterpolator(new FastOutSlowInInterpolator());
    return set;
}
Also used : TransitionSet(android.transition.TransitionSet) ChangeBounds(android.transition.ChangeBounds) FastOutSlowInInterpolator(android.support.v4.view.animation.FastOutSlowInInterpolator) Fade(android.transition.Fade) ChangeImageTransform(android.transition.ChangeImageTransform) TargetApi(android.annotation.TargetApi)

Example 63 with ChangeBounds

use of android.transition.ChangeBounds in project FanLayoutManager by Cleveroad.

the class SharedTransitionSet method init.

private void init() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds()).addTransition(new ChangeTransform()).addTransition(new ChangeImageTransform());
}
Also used : ChangeTransform(android.transition.ChangeTransform) ChangeBounds(android.transition.ChangeBounds) ChangeImageTransform(android.transition.ChangeImageTransform)

Example 64 with ChangeBounds

use of android.transition.ChangeBounds in project Rutgers-Course-Tracker by tevjef.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (!Once.beenDone(Once.THIS_APP_INSTALL, SHOW_TOUR)) {
        Intent intent = new Intent(this, IntroActivity.class);
        startActivity(intent);
        finish();
    }
    RutgersCTApp.getObjectGraph(this).inject(this);
    setContentView(R.layout.activity_main);
    Icepick.restoreInstanceState(this, savedInstanceState);
    if (savedInstanceState == null) {
        TrackedSectionsFragment tsf = new TrackedSectionsFragment();
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            tsf.setEnterTransition(new AutoTransition().excludeTarget(ImageView.class, true));
            tsf.setExitTransition(new Fade(Fade.OUT).excludeTarget(ImageView.class, true));
            tsf.setReenterTransition(new AutoTransition().excludeTarget(ImageView.class, true));
            tsf.setReturnTransition(new Fade(Fade.IN).excludeTarget(ImageView.class, true));
            tsf.setAllowReturnTransitionOverlap(false);
            tsf.setAllowEnterTransitionOverlap(false);
            tsf.setSharedElementEnterTransition(new ChangeBounds().setInterpolator(new DecelerateInterpolator()));
            tsf.setSharedElementReturnTransition(new ChangeBounds().setInterpolator(new DecelerateInterpolator()));
        }
        getFragmentManager().beginTransaction().replace(R.id.container, tsf).commit();
    }
    RutgersCTApp.getObjectGraph(this).get(Alarm.class).setAlarm();
}
Also used : DecelerateInterpolator(android.view.animation.DecelerateInterpolator) AutoTransition(android.transition.AutoTransition) TrackedSectionsFragment(com.tevinjeffrey.rutgersct.ui.trackedsections.TrackedSectionsFragment) ChangeBounds(android.transition.ChangeBounds) Alarm(com.tevinjeffrey.rutgersct.services.Alarm) Intent(android.content.Intent) ImageView(android.widget.ImageView) Fade(android.transition.Fade)

Example 65 with ChangeBounds

use of android.transition.ChangeBounds in project Rutgers-Course-Tracker by tevjef.

the class ChooserFragment method startSubjectFragment.

private void startSubjectFragment(Bundle b) {
    SubjectFragment sf = new SubjectFragment();
    sf.setArguments(b);
    FragmentTransaction ft = getFragmentManager().beginTransaction();
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        sf.setExitTransition(new Fade(Fade.OUT).excludeTarget(ImageView.class, true).setDuration(100));
        sf.setReturnTransition(new Fade(Fade.OUT).excludeTarget(ImageView.class, true).setDuration(100));
        sf.setAllowReturnTransitionOverlap(false);
        sf.setAllowEnterTransitionOverlap(false);
        sf.setSharedElementEnterTransition(new ChangeBounds().setInterpolator(new DecelerateInterpolator()));
        sf.setSharedElementReturnTransition(new ChangeBounds().setInterpolator(new DecelerateInterpolator()));
        ft.addSharedElement(mToolbar, getString(R.string.transition_name_tool_background));
    } else {
        ft.setCustomAnimations(R.anim.enter, R.anim.exit, R.anim.pop_enter, R.anim.pop_exit);
    }
    startFragment(this, sf, ft);
}
Also used : DecelerateInterpolator(android.view.animation.DecelerateInterpolator) FragmentTransaction(android.app.FragmentTransaction) SubjectFragment(com.tevinjeffrey.rutgersct.ui.subject.SubjectFragment) ChangeBounds(android.transition.ChangeBounds) Fade(android.transition.Fade)

Aggregations

ChangeBounds (android.transition.ChangeBounds)93 TransitionSet (android.transition.TransitionSet)71 View (android.view.View)54 Fade (android.transition.Fade)46 TransitionManager (android.transition.TransitionManager)28 Crossfade (android.transition.Crossfade)20 Recolor (android.transition.Recolor)20 ViewGroup (android.view.ViewGroup)17 Transition (android.transition.Transition)14 ChangeText (android.transition.ChangeText)12 TextView (android.widget.TextView)9 Scene (android.transition.Scene)8 Button (android.widget.Button)8 ImageView (android.widget.ImageView)7 AutoTransition (android.transition.AutoTransition)5 AdapterView (android.widget.AdapterView)5 LinearLayout (android.widget.LinearLayout)5 ChangeImageTransform (android.transition.ChangeImageTransform)4 ChangeTransform (android.transition.ChangeTransform)4 Rotate (android.transition.Rotate)4