diff options
Diffstat (limited to 'docs/html/training/material')
-rw-r--r-- | docs/html/training/material/animations.jd | 8 | ||||
-rw-r--r-- | docs/html/training/material/drawables.jd | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/docs/html/training/material/animations.jd b/docs/html/training/material/animations.jd index 86e91a7..6f263db 100644 --- a/docs/html/training/material/animations.jd +++ b/docs/html/training/material/animations.jd @@ -81,8 +81,8 @@ reveal or hide a view.</p> View myView = findViewById(R.id.my_view); // get the center for the clipping circle -int cx = (myView.getLeft() + myView.getRight()) / 2; -int cy = (myView.getTop() + myView.getBottom()) / 2; +int cx = myView.getWidth() / 2; +int cy = myView.getHeight() / 2; // get the final radius for the clipping circle int finalRadius = Math.max(myView.getWidth(), myView.getHeight()); @@ -103,8 +103,8 @@ anim.start(); final View myView = findViewById(R.id.my_view); // get the center for the clipping circle -int cx = (myView.getLeft() + myView.getRight()) / 2; -int cy = (myView.getTop() + myView.getBottom()) / 2; +int cx = myView.getWidth() / 2; +int cy = myView.getHeight() / 2; // get the initial radius for the clipping circle int initialRadius = myView.getWidth(); diff --git a/docs/html/training/material/drawables.jd b/docs/html/training/material/drawables.jd index a2de8e9..c58075e 100644 --- a/docs/html/training/material/drawables.jd +++ b/docs/html/training/material/drawables.jd @@ -36,8 +36,9 @@ alpha masks. You can tint them with color resources or theme attributes that res resources (for example, <code>?android:attr/colorPrimary</code>). Usually, you create these assets only once and color them automatically to match your theme.</p> -<p>You can apply a tint to {@link android.graphics.drawable.BitmapDrawable} or {@link -android.graphics.drawable.NinePatchDrawable} objects with the {@code setTint()} method. You can +<p>You can apply a tint to {@link android.graphics.drawable.BitmapDrawable}, {@link +android.graphics.drawable.NinePatchDrawable} or {@link +android.graphics.drawable.VectorDrawable} objects with the {@code setTint()} method. You can also set the tint color and mode in your layouts with the <code>android:tint</code> and <code>android:tintMode</code> attributes.</p> |