forked from organicmaps/organicmaps-tmp
[android] Fixed review notes
https://github.com/mapsme/omim/pull/11016#discussion_r291244431 https://github.com/mapsme/omim/pull/11016#discussion_r291237183 https://github.com/mapsme/omim/pull/11016#discussion_r291234177
This commit is contained in:
parent
0e8f704106
commit
d46cd16182
2 changed files with 9 additions and 8 deletions
|
@ -45,7 +45,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/MwmTextAppearance.Title"
|
||||
android:textSize="20sp"
|
||||
android:textSize="@dimen/text_size_toolbar"
|
||||
android:gravity="center_horizontal"
|
||||
tools:text="Some title very loooooooooong title"/>
|
||||
<TextView
|
||||
|
|
|
@ -263,21 +263,22 @@ public class OnmapDownloader implements MwmActivity.LeftAnimationTrackListener
|
|||
return;
|
||||
|
||||
mPromoBanner = Framework.nativeGetDownloaderPromoBanner(mCurrentCountry.id);
|
||||
boolean isPromoNotFound = mPromoBanner.getType() == DownloaderPromoBanner.DOWNLOADER_PROMO_TYPE_NO_PROMO;
|
||||
boolean isPromoFound = mPromoBanner.getType() != DownloaderPromoBanner.DOWNLOADER_PROMO_TYPE_NO_PROMO;
|
||||
|
||||
boolean enqueued = mCurrentCountry.status == CountryItem.STATUS_ENQUEUED;
|
||||
boolean progress = mCurrentCountry.status == CountryItem.STATUS_PROGRESS;
|
||||
boolean applying = mCurrentCountry.status == CountryItem.STATUS_APPLYING;
|
||||
boolean hasDialog = enqueued || progress || applying;
|
||||
mPromoContentDivider.setVisibility(isPromoNotFound || !hasDialog ? View.GONE : View.VISIBLE);
|
||||
boolean isDownloading = enqueued || progress || applying;
|
||||
UiUtils.showIf(isPromoFound && isDownloading, mPromoContentDivider);
|
||||
|
||||
if (isPromoNotFound)
|
||||
if (!isPromoFound)
|
||||
return;
|
||||
|
||||
boolean hasPromo = mPromoBanner.getType() == DownloaderPromoBanner.DOWNLOADER_PROMO_TYPE_MEGAFON;
|
||||
boolean hasMegafonPromo = mPromoBanner.getType() == DownloaderPromoBanner.DOWNLOADER_PROMO_TYPE_MEGAFON;
|
||||
boolean hasCatalogPromo = mPromoBanner.getType() == DownloaderPromoBanner.DOWNLOADER_PROMO_TYPE_BOOKMARK_CATALOG;
|
||||
|
||||
UiUtils.showIf(hasDialog && hasPromo, mFrame, R.id.banner);
|
||||
UiUtils.showIf(hasDialog && !hasPromo, mCatalogCallToActionContainer);
|
||||
UiUtils.showIf(isDownloading && hasMegafonPromo, mFrame, R.id.banner);
|
||||
UiUtils.showIf(isDownloading && hasCatalogPromo, mCatalogCallToActionContainer);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue