From 9103e4f748b3950ecfe3c3f6171c6b404ee8ae0d Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Mon, 28 Apr 2014 17:00:21 -0700 Subject: [PATCH] Add Z property to View Change-Id: Iff0b2fc616c650c46e5567a1cc81301afffcbfce --- api/current.txt | 1 + core/java/android/view/View.java | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/api/current.txt b/api/current.txt index c8a59b847a70f..8682d1f21e8b5 100644 --- a/api/current.txt +++ b/api/current.txt @@ -30608,6 +30608,7 @@ package android.view { field protected static final int[] WINDOW_FOCUSED_STATE_SET; field public static final android.util.Property X; field public static final android.util.Property Y; + field public static final android.util.Property Z; } public static class View.AccessibilityDelegate { diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 463a2f789e8ac..9ad7ffb727de2 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -18862,6 +18862,22 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } }; + /** + * A Property wrapper around the z functionality handled by the + * {@link View#setZ(float)} and {@link View#getZ()} methods. + */ + public static final Property Z = new FloatProperty("z") { + @Override + public void setValue(View object, float value) { + object.setZ(value); + } + + @Override + public Float get(View object) { + return object.getZ(); + } + }; + /** * A Property wrapper around the rotation functionality handled by the * {@link View#setRotation(float)} and {@link View#getRotation()} methods.