use of android.transition.TransitionInflater in project android_frameworks_base by ResurrectionRemix.
the class ResourceLoadingTest method sendMessage.
public void sendMessage(View view) {
if (mTransitionManager == null) {
try {
TransitionInflater inflater = TransitionInflater.from(this);
mTransitionManager = inflater.inflateTransitionManager(R.transition.my_transition_mgr, mSceneRoot);
Scene loadedScene = new Scene(mSceneRoot);
System.out.println("loadedScene = " + loadedScene);
Transition loadedTransition = inflater.inflateTransition(R.transition.my_transition);
System.out.println("loadedTransition = " + loadedTransition);
} catch (Exception e) {
System.out.println("Problem loading scene resource: " + e);
}
}
if (mCurrentScene == RESULTS_SCREEN) {
Scene scene = Scene.getSceneForLayout(mSceneRoot, R.layout.search_screen, this);
mTransitionManager.transitionTo(scene);
mCurrentScene = SEARCH_SCREEN;
} else {
Scene scene = Scene.getSceneForLayout(mSceneRoot, R.layout.results_screen, this);
mTransitionManager.transitionTo(scene);
mCurrentScene = RESULTS_SCREEN;
}
}
use of android.transition.TransitionInflater in project android_frameworks_base by ResurrectionRemix.
the class PopupWindow method getTransition.
private Transition getTransition(int resId) {
if (resId != 0 && resId != R.transition.no_transition) {
final TransitionInflater inflater = TransitionInflater.from(mContext);
final Transition transition = inflater.inflateTransition(resId);
if (transition != null) {
final boolean isEmpty = transition instanceof TransitionSet && ((TransitionSet) transition).getTransitionCount() == 0;
if (!isEmpty) {
return transition;
}
}
}
return null;
}
use of android.transition.TransitionInflater in project android_frameworks_base by DirtyUnicorns.
the class PhoneWindow method getTransition.
private Transition getTransition(Transition currentValue, Transition defaultValue, int id) {
if (currentValue != defaultValue) {
return currentValue;
}
int transitionId = getWindowStyle().getResourceId(id, -1);
Transition transition = defaultValue;
if (transitionId != -1 && transitionId != R.transition.no_transition) {
TransitionInflater inflater = TransitionInflater.from(getContext());
transition = inflater.inflateTransition(transitionId);
if (transition instanceof TransitionSet && ((TransitionSet) transition).getTransitionCount() == 0) {
transition = null;
}
}
return transition;
}
use of android.transition.TransitionInflater in project android_frameworks_base by DirtyUnicorns.
the class PopupWindow method getTransition.
private Transition getTransition(int resId) {
if (resId != 0 && resId != R.transition.no_transition) {
final TransitionInflater inflater = TransitionInflater.from(mContext);
final Transition transition = inflater.inflateTransition(resId);
if (transition != null) {
final boolean isEmpty = transition instanceof TransitionSet && ((TransitionSet) transition).getTransitionCount() == 0;
if (!isEmpty) {
return transition;
}
}
}
return null;
}
use of android.transition.TransitionInflater in project android_frameworks_base by crdroidandroid.
the class PhoneWindow method getTransition.
private Transition getTransition(Transition currentValue, Transition defaultValue, int id) {
if (currentValue != defaultValue) {
return currentValue;
}
int transitionId = getWindowStyle().getResourceId(id, -1);
Transition transition = defaultValue;
if (transitionId != -1 && transitionId != R.transition.no_transition) {
TransitionInflater inflater = TransitionInflater.from(getContext());
transition = inflater.inflateTransition(transitionId);
if (transition instanceof TransitionSet && ((TransitionSet) transition).getTransitionCount() == 0) {
transition = null;
}
}
return transition;
}
Aggregations