Methods Summary |
---|
public void | captureValues(TransitionValues values)
View view = values.view;
Integer visibility = (Integer) values.values.get(Visibility.PROPNAME_VISIBILITY);
if (visibility == null) {
visibility = view.getVisibility();
}
values.values.put(PROPNAME_VISIBILITY, visibility);
int[] loc = new int[2];
view.getLocationOnScreen(loc);
loc[0] += Math.round(view.getTranslationX());
loc[0] += view.getWidth() / 2;
loc[1] += Math.round(view.getTranslationY());
loc[1] += view.getHeight() / 2;
values.values.put(PROPNAME_VIEW_CENTER, loc);
|
public java.lang.String[] | getPropagationProperties()
return VISIBILITY_PROPAGATION_VALUES;
|
private static int | getViewCoordinate(TransitionValues values, int coordinateIndex)
if (values == null) {
return -1;
}
int[] coordinates = (int[]) values.values.get(PROPNAME_VIEW_CENTER);
if (coordinates == null) {
return -1;
}
return coordinates[coordinateIndex];
|
public int | getViewVisibility(TransitionValues values)Returns {@link android.view.View#getVisibility()} for the View at the time the values
were captured.
if (values == null) {
return View.GONE;
}
Integer visibility = (Integer) values.values.get(PROPNAME_VISIBILITY);
if (visibility == null) {
return View.GONE;
}
return visibility;
|
public int | getViewX(TransitionValues values)Returns the View's center x coordinate, relative to the screen, at the time the values
were captured.
return getViewCoordinate(values, 0);
|
public int | getViewY(TransitionValues values)Returns the View's center y coordinate, relative to the screen, at the time the values
were captured.
return getViewCoordinate(values, 1);
|