diff options
| author | Dianne Hackborn <hackbod@google.com> | 2015-06-23 19:33:02 +0000 |
|---|---|---|
| committer | Dianne Hackborn <hackbod@google.com> | 2015-06-25 20:24:34 -0700 |
| commit | 70d8be7616a450e9b7ef09c8bda5a8b25936a29a (patch) | |
| tree | 9eeadb688ab64c3c0cdd1d0b79a1849b6fdfbe8a /core/java/android/view/ViewStructure.java | |
| parent | f207285d8d813730683b0c099edff84ac0b13244 (diff) | |
Fix issue #22013372: Assist should take translationX and friends...
...into account when calculating the position information
Actually what we need here is the full transformation matrix, if it
is available. And that means actually computing the location of
views on the screen requires doing this all through transformations,
so the AssistVisualizer has been changed to do this (while still
also keeping the old mechanism for comparison to verify that things
are working correctly).
Also added new properties for elevation and alpha.
And optimized the parcelling of AssistStructure to not write things
that aren't needed; this reduces the parcelled size by about half.
Change-Id: I50b0dd2e6599c74701a5d188617a3eff64b07d03
Diffstat (limited to 'core/java/android/view/ViewStructure.java')
| -rw-r--r-- | core/java/android/view/ViewStructure.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/core/java/android/view/ViewStructure.java b/core/java/android/view/ViewStructure.java index 9ab0ace4d7e0..794622a7b88e 100644 --- a/core/java/android/view/ViewStructure.java +++ b/core/java/android/view/ViewStructure.java @@ -16,6 +16,7 @@ package android.view; +import android.graphics.Matrix; import android.graphics.Rect; import android.os.Bundle; @@ -50,6 +51,28 @@ public abstract class ViewStructure { int height); /** + * Set the transformation matrix associated with this view, as per + * {@link View#getMatrix View.getMatrix()}, or null if there is none. + */ + public abstract void setTransformation(Matrix matrix); + + /** + * Set the visual elevation (shadow) of the view, as per + * {@link View#getZ View.getZ()}. Note this is <em>not</em> related + * to the physical Z-ordering of this view relative to its other siblings (that is how + * they overlap when drawing), it is only the visual representation for shadowing. + */ + public abstract void setElevation(float elevation); + + /** + * Set an alpha transformation that is applied to this view, as per + * {@link View#getAlpha View.getAlpha()}. Value ranges from 0 + * (completely transparent) to 1 (completely opaque); the default is 1, which means + * no transformation. + */ + public abstract void setAlpha(float alpha); + + /** * Set the visibility state of this view, as per * {@link View#getVisibility View.getVisibility()}. */ |
