forked from organicmaps/organicmaps
[android] Added hidding the banner icon if icon url is empty
This commit is contained in:
parent
2d3229d6ed
commit
09c3343d9c
1 changed files with 9 additions and 1 deletions
|
@ -179,9 +179,17 @@ final class BannerController implements View.OnClickListener
|
|||
|
||||
private void loadIcon(@NonNull Banner banner)
|
||||
{
|
||||
if (mIcon == null || TextUtils.isEmpty(banner.getIconUrl()))
|
||||
if (mIcon == null)
|
||||
return;
|
||||
|
||||
if (TextUtils.isEmpty(banner.getIconUrl()))
|
||||
{
|
||||
UiUtils.hide(mIcon);
|
||||
return;
|
||||
}
|
||||
|
||||
UiUtils.show(mIcon);
|
||||
|
||||
Glide.with(mIcon.getContext())
|
||||
.load(banner.getIconUrl())
|
||||
.centerCrop()
|
||||
|
|
Loading…
Add table
Reference in a new issue