use of android.transition.ChangeBounds in project android_frameworks_base by DirtyUnicorns.
the class Demo2 method sendMessage.
public void sendMessage(View view) {
if (mFirstTime) {
mFirstTime = false;
// mResultsScreen = new Scene(this, mSceneRoot, R.layout.results_screen);
try {
mSearchScreen = Scene.getSceneForLayout(mSceneRoot, R.layout.search_screen, this);
mResultsScreen = Scene.getSceneForLayout(mSceneRoot, R.layout.search_screen, this);
} catch (Exception e) {
System.out.println("Problem loading scene resource: " + e);
}
TransitionSet transition = new TransitionSet();
transition.addTransition(new Fade().addTarget(R.id.resultsText).addTarget(R.id.resultsList)).addTransition(new ChangeBounds().addTarget(R.id.searchContainer)).addTransition(new Recolor().addTarget(R.id.container));
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 android_frameworks_base by ResurrectionRemix.
the class ChangingText method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.changing_text_1);
View container = findViewById(R.id.container);
mSceneRoot = (ViewGroup) container.getParent();
mScene1 = Scene.getSceneForLayout(mSceneRoot, R.layout.changing_text_1, this);
mScene2 = Scene.getSceneForLayout(mSceneRoot, R.layout.changing_text_2, this);
mChanger = new TransitionSet().setOrdering(TransitionSet.ORDERING_TOGETHER);
mChanger.addTransition(new ChangeBounds()).addTransition(new ChangeText());
mCurrentScene = mScene1;
}
use of android.transition.ChangeBounds in project android_frameworks_base by ResurrectionRemix.
the class ClippingText method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.clipping_text_1);
View container = (View) findViewById(R.id.container);
mSceneRoot = (ViewGroup) container.getParent();
mScene1 = Scene.getSceneForLayout(mSceneRoot, R.layout.clipping_text_1, this);
mScene2 = Scene.getSceneForLayout(mSceneRoot, R.layout.clipping_text_2, this);
mChanger = new TransitionSet().setOrdering(TransitionSet.ORDERING_TOGETHER);
ChangeBounds changeBounds = new ChangeBounds();
changeBounds.setResizeClip(true);
mChanger.addTransition(changeBounds).addTransition(new ChangeText());
mCurrentScene = mScene1;
}
use of android.transition.ChangeBounds in project android_frameworks_base by ResurrectionRemix.
the class CrossFadeDemo method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.crossfade);
View container = (View) findViewById(R.id.container);
mSceneRoot = (ViewGroup) container.getParent();
mScene1 = Scene.getSceneForLayout(mSceneRoot, R.layout.crossfade, this);
mScene2 = Scene.getSceneForLayout(mSceneRoot, R.layout.crossfade_1, this);
Crossfade crossfade = new Crossfade();
crossfade.setFadeBehavior(Crossfade.FADE_BEHAVIOR_CROSSFADE);
crossfade.setResizeBehavior(Crossfade.RESIZE_BEHAVIOR_NONE);
crossfade.addTarget(R.id.textview).addTarget(R.id.textview1).addTarget(R.id.textview2);
mTransitionManager = new TransitionManager();
TransitionSet moveCrossFade = new TransitionSet();
moveCrossFade.addTransition(crossfade).addTransition(new ChangeBounds());
mTransitionManager.setTransition(mScene1, moveCrossFade);
mTransitionManager.setTransition(mScene2, moveCrossFade);
mCurrentScene = 1;
}
use of android.transition.ChangeBounds in project android_frameworks_base by ResurrectionRemix.
the class CrossfadeImage method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.crossfade_image);
ViewGroup container = (ViewGroup) findViewById(R.id.container);
mSceneRoot = container;
mImageView = (ImageView) findViewById(R.id.contact_picture);
mImageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
Crossfade mCrossfade = new Crossfade();
mCrossfade.addTarget(R.id.contact_picture);
TransitionSet group = new TransitionSet();
group.setDuration(1500);
group.addTransition(mCrossfade).addTransition(new ChangeBounds());
mTransition = group;
}
Aggregations