use of com.android.settingslib.drawable.CircleFramedDrawable in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SettingsHomepageActivity method getCircularUserIcon.
private Drawable getCircularUserIcon(Context context) {
Bitmap bitmapUserIcon = mUserManager.getUserIcon(UserHandle.myUserId());
if (bitmapUserIcon == null) {
// get default user icon.
final Drawable defaultUserIcon = UserIcons.getDefaultUserIcon(context.getResources(), UserHandle.myUserId(), false);
bitmapUserIcon = UserIcons.convertToBitmap(defaultUserIcon);
}
Drawable drawableUserIcon = new CircleFramedDrawable(bitmapUserIcon, (int) context.getResources().getDimension(R.dimen.circle_avatar_size));
return drawableUserIcon;
}
Aggregations