/** * Create a new {@code IndeterminateCircularProgressDrawable}. * * @param context the {@code Context} for retrieving style information. */ public IndeterminateCircularProgressDrawable(@NonNull Context context) { super(context); float density = context.getResources().getDisplayMetrics().density; mProgressIntrinsicSize = Math.round(PROGRESS_INTRINSIC_SIZE_DP * density); mPaddedIntrinsicSize = Math.round(PADDED_INTRINSIC_SIZE_DP * density); mAnimators = new Animator[] { Animators.createIndeterminate(mRingPathTransform), Animators.createIndeterminateRotation(mRingRotation) }; }