forked from organicmaps/organicmaps
[android] Disabled the place reviews.
Signed-off-by: Altynaika <altynaika.toktomuratovaa@gmail.com>
This commit is contained in:
parent
ffc8150def
commit
eb82668fc6
3 changed files with 33 additions and 33 deletions
|
@ -8,30 +8,30 @@
|
|||
android:orientation="horizontal"
|
||||
tools:background="#8000FFFF"
|
||||
tools:showIn="@layout/place_page_preview">
|
||||
<com.mapswithme.maps.widget.RatingView
|
||||
android:id="@+id/rating_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/rating_view_height_small"
|
||||
android:paddingLeft="@dimen/margin_quarter_plus"
|
||||
android:paddingStart="@dimen/margin_quarter_plus"
|
||||
android:paddingRight="@dimen/margin_quarter_plus"
|
||||
android:paddingEnd="@dimen/margin_quarter_plus"
|
||||
android:paddingTop="@dimen/margin_quarter"
|
||||
android:paddingBottom="@dimen/margin_quarter"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textSize="@dimen/text_size_body_4"
|
||||
tools:visibility="visible"/>
|
||||
<TextView
|
||||
android:id="@+id/tv__review_count"
|
||||
android:layout_marginStart="@dimen/margin_half"
|
||||
android:layout_marginLeft="@dimen/margin_half"
|
||||
android:ellipsize="end"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body4"
|
||||
tools:text="1309 reviews"/>
|
||||
<!-- <com.mapswithme.maps.widget.RatingView-->
|
||||
<!-- android:id="@+id/rating_view"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="@dimen/rating_view_height_small"-->
|
||||
<!-- android:paddingLeft="@dimen/margin_quarter_plus"-->
|
||||
<!-- android:paddingStart="@dimen/margin_quarter_plus"-->
|
||||
<!-- android:paddingRight="@dimen/margin_quarter_plus"-->
|
||||
<!-- android:paddingEnd="@dimen/margin_quarter_plus"-->
|
||||
<!-- android:paddingTop="@dimen/margin_quarter"-->
|
||||
<!-- android:paddingBottom="@dimen/margin_quarter"-->
|
||||
<!-- android:layout_gravity="center_vertical"-->
|
||||
<!-- android:textSize="@dimen/text_size_body_4"-->
|
||||
<!-- tools:visibility="visible"/>-->
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv__review_count"-->
|
||||
<!-- android:layout_marginStart="@dimen/margin_half"-->
|
||||
<!-- android:layout_marginLeft="@dimen/margin_half"-->
|
||||
<!-- android:ellipsize="end"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_weight="1"-->
|
||||
<!-- android:layout_gravity="center_vertical"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:textAppearance="@style/MwmTextAppearance.Body4"-->
|
||||
<!-- tools:text="1309 reviews"/>-->
|
||||
<TextView
|
||||
android:id="@+id/tv__hotel_price"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -198,11 +198,11 @@ public class UGCController implements View.OnClickListener, UGC.ReceiveUGCListen
|
|||
//UiUtils.showIf(canUserRate(ugcUpdate), mLeaveReviewButton, mUgcAddRatingView);
|
||||
//UiUtils.showIf(ugc != null, mUgcMoreReviews);
|
||||
//UiUtils.showIf(ugc != null && impress != UGC.RATING_NONE, mSummaryRootView);
|
||||
RatingView ratingView = mPreviewUgcInfoView.findViewById(R.id.rating_view);
|
||||
// RatingView ratingView = mPreviewUgcInfoView.findViewById(R.id.rating_view);
|
||||
if (ugc == null)
|
||||
{
|
||||
mReviewCount.setText(ugcUpdate != null ? R.string.placepage_reviewed : R.string.placepage_no_reviews);
|
||||
ratingView.setRating(ugcUpdate == null ? Impress.NONE : Impress.COMING_SOON, rating);
|
||||
// ratingView.setRating(ugcUpdate == null ? Impress.NONE : Impress.COMING_SOON, rating);
|
||||
setUserReviewAndRatingsView(ugcUpdate);
|
||||
return;
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ public class UGCController implements View.OnClickListener, UGC.ReceiveUGCListen
|
|||
R.plurals.placepage_summary_rating_description, reviewsCount, reviewsCount));
|
||||
setSummaryViews(ugc, impress, rating);
|
||||
}
|
||||
ratingView.setRating(Impress.values()[impress], rating);
|
||||
// ratingView.setRating(Impress.values()[impress], rating);
|
||||
setUserReviewAndRatingsView(ugcUpdate);
|
||||
List<UGC.Review> reviews = ugc.getReviews();
|
||||
if (reviews != null)
|
||||
|
|
|
@ -147,7 +147,7 @@ public class PlacePageView extends NestedScrollViewClickFixed
|
|||
private TextView mTvDistance;
|
||||
private TextView mTvAddress;
|
||||
private View mPreviewRatingInfo;
|
||||
private RatingView mRatingView;
|
||||
// private RatingView mRatingView;
|
||||
private TextView mTvSponsoredPrice;
|
||||
@SuppressWarnings("NullableProblems")
|
||||
@NonNull
|
||||
|
@ -426,7 +426,7 @@ public class PlacePageView extends NestedScrollViewClickFixed
|
|||
mPreview.findViewById(R.id.search_hotels_btn).setOnClickListener(this);
|
||||
|
||||
mPreviewRatingInfo = mPreview.findViewById(R.id.preview_rating_info);
|
||||
mRatingView = mPreviewRatingInfo.findViewById(R.id.rating_view);
|
||||
// mRatingView = mPreviewRatingInfo.findViewById(R.id.rating_view);
|
||||
mTvSponsoredPrice = mPreviewRatingInfo.findViewById(R.id.tv__hotel_price);
|
||||
mHotelDiscount = mPreviewRatingInfo.findViewById(R.id.discount_in_percents);
|
||||
|
||||
|
@ -936,8 +936,8 @@ public class PlacePageView extends NestedScrollViewClickFixed
|
|||
String text = getResources().getQuantityString(
|
||||
R.plurals.placepage_summary_rating_description, reviewsCount, reviewsCount);
|
||||
mHotelRatingBase.setText(text);
|
||||
TextView previewReviewCountView = mPreviewRatingInfo.findViewById(R.id.tv__review_count);
|
||||
previewReviewCountView.setText(text);
|
||||
// TextView previewReviewCountView = mPreviewRatingInfo.findViewById(R.id.tv__review_count);
|
||||
// previewReviewCountView.setText(text);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1374,8 +1374,8 @@ public class PlacePageView extends NestedScrollViewClickFixed
|
|||
@SuppressWarnings("ConstantConditions")
|
||||
boolean isRatingEmpty = TextUtils.isEmpty(mSponsored.getRating());
|
||||
Impress impress = Impress.values()[mSponsored.getImpress()];
|
||||
mRatingView.setRating(impress, mSponsored.getRating());
|
||||
UiUtils.showIf(!isRatingEmpty, mRatingView);
|
||||
// mRatingView.setRating(impress, mSponsored.getRating());
|
||||
// UiUtils.showIf(!isRatingEmpty, mRatingView);
|
||||
mTvSponsoredPrice.setText(mSponsoredPrice);
|
||||
UiUtils.showIf(!isPriceEmpty, mTvSponsoredPrice);
|
||||
boolean isBookingInfoExist = (!isRatingEmpty || !isPriceEmpty) &&
|
||||
|
|
Loading…
Add table
Reference in a new issue