forked from organicmaps/organicmaps
[android] Hide all UGC
Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
This commit is contained in:
parent
016fc683b8
commit
80c7c2eba6
3 changed files with 17 additions and 13 deletions
|
@ -82,31 +82,34 @@
|
|||
|
||||
<include
|
||||
android:id="@+id/place_page_taxi_shadow"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
layout="@layout/place_page_fat_shadow"/>
|
||||
|
||||
<include
|
||||
android:id="@+id/place_page_taxi_divider"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/divider_height"
|
||||
layout="@layout/divider_horizontal"/>
|
||||
|
||||
<include layout="@layout/place_page_taxi"/>
|
||||
<include android:visibility="gone" layout="@layout/place_page_taxi"/>
|
||||
|
||||
<include layout="@layout/place_page_ugc"/>
|
||||
<include android:visibility="gone" layout="@layout/place_page_ugc"/>
|
||||
|
||||
<include
|
||||
layout="@layout/place_page_fat_shadow"
|
||||
android:id="@+id/edit_top_space"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<include layout="@layout/place_page_editor"/>
|
||||
<include android:visibility="gone" layout="@layout/place_page_editor"/>
|
||||
|
||||
<include layout="@layout/place_page_add_business"/>
|
||||
<include android:visibility="gone" layout="@layout/place_page_add_business"/>
|
||||
|
||||
<include layout="@layout/place_page_add"/>
|
||||
<include android:visibility="gone" layout="@layout/place_page_add"/>
|
||||
|
||||
<androidx.legacy.widget.Space
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -161,6 +161,7 @@
|
|||
|
||||
<include
|
||||
android:id="@+id/preview_rating_info"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignWithParentIfMissing="true"
|
||||
|
|
|
@ -193,11 +193,11 @@ public class UGCController implements View.OnClickListener, UGC.ReceiveUGCListen
|
|||
public void onUGCReceived(@Nullable UGC ugc, @Nullable UGCUpdate ugcUpdate, @UGC.Impress int impress,
|
||||
@NonNull String rating)
|
||||
{
|
||||
UiUtils.show(mUgcRootView);
|
||||
UiUtils.showIf(ugc != null || canUserRate(ugcUpdate) || ugcUpdate != null, mPreviewUgcInfoView);
|
||||
UiUtils.showIf(canUserRate(ugcUpdate), mLeaveReviewButton, mUgcAddRatingView);
|
||||
UiUtils.showIf(ugc != null, mUgcMoreReviews);
|
||||
UiUtils.showIf(ugc != null && impress != UGC.RATING_NONE, mSummaryRootView);
|
||||
//UiUtils.show(mUgcRootView);
|
||||
//UiUtils.showIf(ugc != null || canUserRate(ugcUpdate) || ugcUpdate != null, mPreviewUgcInfoView);
|
||||
//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);
|
||||
if (ugc == null)
|
||||
{
|
||||
|
@ -220,10 +220,10 @@ public class UGCController implements View.OnClickListener, UGC.ReceiveUGCListen
|
|||
List<UGC.Review> reviews = ugc.getReviews();
|
||||
if (reviews != null)
|
||||
mUGCReviewAdapter.setItems(ugc.getReviews());
|
||||
UiUtils.showIf(reviews != null, mReviewListDivider);
|
||||
//UiUtils.showIf(reviews != null, mReviewListDivider);
|
||||
// TODO: don't show "more reviews" button while reviews screen activity is not ready.
|
||||
UiUtils.showIf(false /* reviews != null && reviews.size() > UGCReviewAdapter.MAX_COUNT */,
|
||||
mUgcMoreReviews);
|
||||
//UiUtils.showIf(false /* reviews != null && reviews.size() > UGCReviewAdapter.MAX_COUNT */,
|
||||
// mUgcMoreReviews);
|
||||
}
|
||||
|
||||
private void setSummaryViews(@NonNull UGC ugc, @UGC.Impress int impress, @NonNull String rating)
|
||||
|
|
Loading…
Add table
Reference in a new issue