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;
}
}
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;
}
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());
}
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();
}
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);
}
Aggregations