Created
May 30, 2017 19:01
-
-
Save netodevel/e146976de2684f015da41ae6bb0976d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
imageViewProfile = (ImageView) findViewById(R.id.image_profile); | |
int arcWidth = 15; | |
mAnimatedDrawable = new CircularAnimatedDrawable(imageViewProfile, arcWidth, Color.WHITE); | |
int offset = (imageViewProfile.getLayoutParams().width - imageViewProfile.getLayoutParams().height) / 2; | |
int left = offset; | |
int right = imageViewProfile.getLayoutParams().width - offset; | |
int bottom = imageViewProfile.getLayoutParams().height; | |
int top = 0; | |
mAnimatedDrawable.setBounds(left, top, right, bottom); | |
mAnimatedDrawable.setCallback(imageViewProfile); | |
mAnimatedDrawable.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment