make size final and move to the only used place
This commit is contained in:
parent
e829548924
commit
4289444a4c
1 changed files with 1 additions and 1 deletions
|
@ -70,12 +70,12 @@ public class PassVisualizer {
|
|||
findById(res, R.id.actionsContainer).setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
int size = (int) res.getResources().getDimension(R.dimen.pass_icon_size);
|
||||
final ImageView icon_img = findById(res, R.id.icon);
|
||||
|
||||
icon_img.setBackgroundColor(pass.getBackGroundColor());
|
||||
|
||||
if (pass.getIconBitmap().isPresent()) {
|
||||
final int size = (int) res.getResources().getDimension(R.dimen.pass_icon_size);
|
||||
icon_img.setImageBitmap(Bitmap.createScaledBitmap(pass.getIconBitmap().get(), size, size, false));
|
||||
} else {
|
||||
icon_img.setImageResource(R.drawable.ic_launcher);
|
||||
|
|
Loading…
Reference in a new issue