From c2feaa3387e53b56a38a0637194ab40d0bea3775 Mon Sep 17 00:00:00 2001 From: Roman Romanov Date: Fri, 21 Oct 2016 08:30:16 +0400 Subject: [android] Review fixes --- android/res/drawable-hdpi/ic_opentable.png | Bin 0 -> 720 bytes android/res/drawable-hdpi/img_logo_opentable.png | Bin 720 -> 0 bytes android/res/drawable-mdpi/ic_opentable.png | Bin 0 -> 477 bytes android/res/drawable-mdpi/img_logo_opentable.png | Bin 477 -> 0 bytes android/res/drawable-xhdpi/ic_opentable.png | Bin 0 -> 1080 bytes android/res/drawable-xhdpi/img_logo_opentable.png | Bin 1080 -> 0 bytes android/res/drawable-xxhdpi/ic_opentable.png | Bin 0 -> 1832 bytes android/res/drawable-xxhdpi/img_logo_opentable.png | Bin 1832 -> 0 bytes android/res/drawable-xxxhdpi/ic_opentable.png | Bin 0 -> 2695 bytes .../res/drawable-xxxhdpi/img_logo_opentable.png | Bin 2695 -> 0 bytes .../maps/widget/placepage/PlacePageButtons.java | 2 +- .../maps/widget/placepage/PlacePageView.java | 27 +++++++++++---------- 12 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 android/res/drawable-hdpi/ic_opentable.png delete mode 100644 android/res/drawable-hdpi/img_logo_opentable.png create mode 100644 android/res/drawable-mdpi/ic_opentable.png delete mode 100644 android/res/drawable-mdpi/img_logo_opentable.png create mode 100644 android/res/drawable-xhdpi/ic_opentable.png delete mode 100644 android/res/drawable-xhdpi/img_logo_opentable.png create mode 100644 android/res/drawable-xxhdpi/ic_opentable.png delete mode 100644 android/res/drawable-xxhdpi/img_logo_opentable.png create mode 100644 android/res/drawable-xxxhdpi/ic_opentable.png delete mode 100644 android/res/drawable-xxxhdpi/img_logo_opentable.png diff --git a/android/res/drawable-hdpi/ic_opentable.png b/android/res/drawable-hdpi/ic_opentable.png new file mode 100644 index 0000000000..fff32a337c Binary files /dev/null and b/android/res/drawable-hdpi/ic_opentable.png differ diff --git a/android/res/drawable-hdpi/img_logo_opentable.png b/android/res/drawable-hdpi/img_logo_opentable.png deleted file mode 100644 index fff32a337c..0000000000 Binary files a/android/res/drawable-hdpi/img_logo_opentable.png and /dev/null differ diff --git a/android/res/drawable-mdpi/ic_opentable.png b/android/res/drawable-mdpi/ic_opentable.png new file mode 100644 index 0000000000..ae53c7be0c Binary files /dev/null and b/android/res/drawable-mdpi/ic_opentable.png differ diff --git a/android/res/drawable-mdpi/img_logo_opentable.png b/android/res/drawable-mdpi/img_logo_opentable.png deleted file mode 100644 index ae53c7be0c..0000000000 Binary files a/android/res/drawable-mdpi/img_logo_opentable.png and /dev/null differ diff --git a/android/res/drawable-xhdpi/ic_opentable.png b/android/res/drawable-xhdpi/ic_opentable.png new file mode 100644 index 0000000000..1d7641a1ef Binary files /dev/null and b/android/res/drawable-xhdpi/ic_opentable.png differ diff --git a/android/res/drawable-xhdpi/img_logo_opentable.png b/android/res/drawable-xhdpi/img_logo_opentable.png deleted file mode 100644 index 1d7641a1ef..0000000000 Binary files a/android/res/drawable-xhdpi/img_logo_opentable.png and /dev/null differ diff --git a/android/res/drawable-xxhdpi/ic_opentable.png b/android/res/drawable-xxhdpi/ic_opentable.png new file mode 100644 index 0000000000..2d8fbad633 Binary files /dev/null and b/android/res/drawable-xxhdpi/ic_opentable.png differ diff --git a/android/res/drawable-xxhdpi/img_logo_opentable.png b/android/res/drawable-xxhdpi/img_logo_opentable.png deleted file mode 100644 index 2d8fbad633..0000000000 Binary files a/android/res/drawable-xxhdpi/img_logo_opentable.png and /dev/null differ diff --git a/android/res/drawable-xxxhdpi/ic_opentable.png b/android/res/drawable-xxxhdpi/ic_opentable.png new file mode 100644 index 0000000000..1b1de05206 Binary files /dev/null and b/android/res/drawable-xxxhdpi/ic_opentable.png differ diff --git a/android/res/drawable-xxxhdpi/img_logo_opentable.png b/android/res/drawable-xxxhdpi/img_logo_opentable.png deleted file mode 100644 index 1b1de05206..0000000000 Binary files a/android/res/drawable-xxxhdpi/img_logo_opentable.png and /dev/null differ diff --git a/android/src/com/mapswithme/maps/widget/placepage/PlacePageButtons.java b/android/src/com/mapswithme/maps/widget/placepage/PlacePageButtons.java index 6e3575db51..c9e1335ce4 100644 --- a/android/src/com/mapswithme/maps/widget/placepage/PlacePageButtons.java +++ b/android/src/com/mapswithme/maps/widget/placepage/PlacePageButtons.java @@ -58,7 +58,7 @@ final class PlacePageButtons @Override int getIcon() { - return R.drawable.img_logo_opentable; + return R.drawable.ic_opentable; } }, diff --git a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java index 0d4380230d..bb99e1d3cf 100644 --- a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java +++ b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java @@ -110,9 +110,9 @@ public class PlacePageView extends RelativeLayout private ArrowView mAvDirection; private TextView mTvDistance; private TextView mTvAddress; - private View mHotelInfo; - private TextView mTvHotelRating; - private TextView mTvHotelPrice; + private View mSponsoredInfo; + private TextView mTvSponsoredRating; + private TextView mTvSponsoredPrice; // Details. private ScrollView mDetails; private View mPhone; @@ -265,9 +265,9 @@ public class PlacePageView extends RelativeLayout mTvAddress = (TextView) mPreview.findViewById(R.id.tv__address); - mHotelInfo = mPreview.findViewById(R.id.hotel_info_frame); - mTvHotelRating = (TextView) mHotelInfo.findViewById(R.id.tv__hotel_rating); - mTvHotelPrice = (TextView) mHotelInfo.findViewById(R.id.tv__hotel_price); + mSponsoredInfo = mPreview.findViewById(R.id.hotel_info_frame); + mTvSponsoredRating = (TextView) mSponsoredInfo.findViewById(R.id.tv__hotel_rating); + mTvSponsoredPrice = (TextView) mSponsoredInfo.findViewById(R.id.tv__hotel_price); mDetails = (ScrollView) findViewById(R.id.pp__details); RelativeLayout address = (RelativeLayout) mDetails.findViewById(R.id.ll__place_name); @@ -410,7 +410,7 @@ public class PlacePageView extends RelativeLayout case BOOKING: case OPENTABLE: - onBookingClick(true /* book */); + onSponsoredClick(true /* book */); break; } } @@ -639,7 +639,7 @@ public class PlacePageView extends RelativeLayout // TODO go to selected object on map } - private void onBookingClick(final boolean book) + private void onSponsoredClick(final boolean book) { // TODO (trashkalmar): Set correct text Utils.checkConnection(getActivity(), R.string.common_check_internet_connection_dialog, new Utils.Proc() @@ -685,7 +685,8 @@ public class PlacePageView extends RelativeLayout try { followUrl(book ? info.mUrl : info.mUrlDescription); - } catch (ActivityNotFoundException e) + } + catch (ActivityNotFoundException e) { AlohaHelper.logException(e); } @@ -878,11 +879,11 @@ public class PlacePageView extends RelativeLayout UiUtils.setTextAndHideIfEmpty(mTvAddress, mMapObject.getAddress()); boolean sponsored = (mSponsored != null); - UiUtils.showIf(sponsored, mHotelInfo); + UiUtils.showIf(sponsored, mSponsoredInfo); if (sponsored) { - mTvHotelRating.setText(mSponsored.mRating); - UiUtils.setTextAndHideIfEmpty(mTvHotelPrice, mSponsoredPrice); + UiUtils.setTextAndHideIfEmpty(mTvSponsoredRating, mSponsored.mRating); + UiUtils.setTextAndHideIfEmpty(mTvSponsoredPrice, mSponsoredPrice); } } @@ -1176,7 +1177,7 @@ public class PlacePageView extends RelativeLayout addPlace(); break; case R.id.ll__more: - onBookingClick(false /* book */); + onSponsoredClick(false /* book */); break; case R.id.ll__place_latlon: mIsLatLonDms = !mIsLatLonDms; -- cgit v1.2.3