Fix visibility propagation check.

Bug 16704963

Change-Id: I2538bac4b4565ac8c6b27407c7679fea55b1092b
This commit is contained in:
George Mount
2014-07-31 09:58:16 -07:00
parent fa4aeeeb71
commit 6ceac2eafb
2 changed files with 6 additions and 2 deletions

View File

@@ -43,7 +43,7 @@ import android.view.ViewGroup;
*/
public abstract class Visibility extends Transition {
private static final String PROPNAME_VISIBILITY = "android:visibility:visibility";
static final String PROPNAME_VISIBILITY = "android:visibility:visibility";
private static final String PROPNAME_PARENT = "android:visibility:parent";
private static final String PROPNAME_SCREEN_LOCATION = "android:visibility:screenLocation";

View File

@@ -42,7 +42,11 @@ public abstract class VisibilityPropagation extends TransitionPropagation {
@Override
public void captureValues(TransitionValues values) {
View view = values.view;
values.values.put(PROPNAME_VISIBILITY, view.getVisibility());
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());