Fix visibility propagation check.
Bug 16704963 Change-Id: I2538bac4b4565ac8c6b27407c7679fea55b1092b
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user