Created
December 7, 2016 18:36
-
-
Save muthuraj57/2d79bb31aa7ef39ea2c36294967bd753 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* | |
* Path of them image to be clipped (to be shown) | |
* */ | |
Path clipPath; | |
/* | |
* Place holder drawable (with background color and initials) | |
* */ | |
Drawable drawable; | |
/* | |
* Contains initials of the member | |
* */ | |
String text; | |
/* | |
* Used to set size and color of the member initials | |
* */ | |
TextPaint textPaint; | |
/* | |
* Used as background of the initials with user specific color | |
* */ | |
Paint paint; | |
/* | |
* Shape to be drawn | |
* */ | |
int shape; | |
/* | |
* Constants to define shape | |
* */ | |
protected static final int CIRCLE = 0; | |
protected static final int RECTANGLE = 1; | |
/* | |
* User whose avatar should be displayed | |
* */ | |
User user; | |
/* | |
* Image width and height (both are same and constant, defined in dimens.xml | |
* We cache them in this field | |
* */ | |
private int imageSize; | |
/* | |
* Corner radius for rounded rectangle image | |
* */ | |
int cornerRadius; | |
/* | |
* Bounds of the canvas in float | |
* Used to set bounds of member initial and background | |
* */ | |
RectF rectF; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment