Bug
22202425
Change-Id: Ic9b5b8ec88b8ae2ece2312e3bc3d4fd49ffc1f1f
* on thread responsiveness.
*
* @param view The View will be clipped to the animating circle.
* on thread responsiveness.
*
* @param view The View will be clipped to the animating circle.
- * @param centerX The x coordinate of the center of the animating circle.
- * @param centerY The y coordinate of the center of the animating circle.
+ * @param centerX The x coordinate of the center of the animating circle, relative to
+ * <code>view</code>.
+ * @param centerY The y coordinate of the center of the animating circle, relative to
+ * <code>view</code>.
* @param startRadius The starting radius of the animating circle.
* @param endRadius The ending radius of the animating circle.
*/
* @param startRadius The starting radius of the animating circle.
* @param endRadius The ending radius of the animating circle.
*/
View myView = findViewById(R.id.my_view);
// get the center for the clipping circle
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());
// get the final radius for the clipping circle
int finalRadius = Math.max(myView.getWidth(), myView.getHeight());
final View myView = findViewById(R.id.my_view);
// get the center for the clipping circle
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();
// get the initial radius for the clipping circle
int initialRadius = myView.getWidth();