diff options
author | Александр Зацепин <az@mapswithme.com> | 2017-06-19 17:13:44 +0300 |
---|---|---|
committer | Yuri Gorshenin <mipt.vi002@gmail.com> | 2017-07-05 16:41:38 +0300 |
commit | 87bf0b9421621f72c1cb3904021300314a7bc80e (patch) | |
tree | 9cfad74e0b2ac6ba68b9c079a4390354a2a9083b | |
parent | 94dff2d90e4ff9d5110cc6e87d87111d5d035c04 (diff) |
[android] Added UGC UI in PP
-rw-r--r-- | android/res/layout/item_ugc_comment.xml | 115 | ||||
-rw-r--r-- | android/res/layout/place_page_details.xml | 2 | ||||
-rw-r--r-- | android/res/layout/place_page_ugc.xml | 94 |
3 files changed, 211 insertions, 0 deletions
diff --git a/android/res/layout/item_ugc_comment.xml b/android/res/layout/item_ugc_comment.xml new file mode 100644 index 0000000000..5c231ff46c --- /dev/null +++ b/android/res/layout/item_ugc_comment.xml @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <View + android:id="@+id/v__divider" + android:layout_width="match_parent" + android:layout_height="1dp" + android:layout_marginLeft="@dimen/margin_base" + android:layout_marginRight="@dimen/margin_base" + android:background="?dividerHorizontal"/> + + <TextView + android:id="@+id/tv__user_name" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="@dimen/margin_base" + android:layout_marginStart="@dimen/margin_base" + android:layout_marginTop="@dimen/margin_base" + android:layout_toLeftOf="@+id/tv__comment_date" + android:layout_toStartOf="@+id/tv__comment_date" + android:layout_below="@id/v__divider" + android:textAppearance="@style/MwmTextAppearance.Body3" + tools:text="Аleksey"/> + + <TextView + android:id="@+id/tv__comment_date" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/margin_base" + android:layout_marginRight="@dimen/margin_base" + android:layout_marginEnd="@dimen/margin_base" + android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" + android:layout_alignParentTop="true" + android:textAppearance="@style/MwmTextAppearance.Body4" + tools:text="March 29, 2016"/> + + <TextView + android:id="@+id/tv__review" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="@dimen/margin_base" + android:layout_marginStart="@dimen/margin_base" + android:layout_marginRight="@dimen/margin_base" + android:layout_marginEnd="@dimen/margin_base" + android:layout_marginTop="@dimen/margin_half_plus" + android:layout_below="@id/tv__user_name" + android:textAppearance="@style/MwmTextAppearance.Body3.Primary" + android:visibility="gone" + tools:visibility="visible" + tools:text="Interesting place among SoHo, Little Italy and China town. Modern design. Great view from roof. Near subway. Free refreshment every afternoon. The staff was very friendly."/> + + <ImageView + android:id="@+id/like" + android:layout_marginLeft="@dimen/margin_base" + android:layout_marginStart="@dimen/margin_base" + android:layout_marginTop="@dimen/margin_base" + android:src="@android:drawable/star_on" + android:layout_below="@id/tv__review" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> + + <TextView + android:id="@+id/like_count" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toRightOf="@id/like" + android:layout_toEndOf="@id/like" + android:layout_alignBottom="@id/like" + android:layout_marginLeft="@dimen/margin_quarter_plus" + android:layout_marginStart="@dimen/margin_quarter_plus" + android:textAppearance="@style/MwmTextAppearance.Body3" + tools:text="2"/> + + <ImageView + android:id="@+id/dislike" + android:layout_marginLeft="@dimen/margin_base" + android:layout_marginStart="@dimen/margin_base" + android:layout_marginTop="@dimen/margin_base" + android:layout_toRightOf="@id/like_count" + android:layout_toEndOf="@id/like_count" + android:src="@android:drawable/star_on" + android:layout_below="@id/tv__review" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> + + <TextView + android:id="@+id/dislike_count" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toRightOf="@id/dislike" + android:layout_toEndOf="@id/dislike" + android:layout_alignBottom="@id/dislike" + android:layout_marginLeft="@dimen/margin_quarter_plus" + android:layout_marginStart="@dimen/margin_quarter_plus" + android:layout_toLeftOf="@+id/tv__original" + android:layout_toStartOf="@+id/tv__original" + android:textAppearance="@style/MwmTextAppearance.Body3" + tools:text="0"/> + + <TextView + android:id="@+id/tv__original" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + style="@style/MwmTextAppearance.Body4" + android:layout_alignParentEnd="true" + android:layout_alignParentRight="true" + android:layout_alignBottom="@id/dislike_count" + android:layout_marginEnd="@dimen/margin_base" + android:layout_marginRight="@dimen/margin_base" + android:text="Show original"/> +</RelativeLayout> diff --git a/android/res/layout/place_page_details.xml b/android/res/layout/place_page_details.xml index 5d9b193e4d..4a02b62b1e 100644 --- a/android/res/layout/place_page_details.xml +++ b/android/res/layout/place_page_details.xml @@ -44,6 +44,8 @@ <include layout="@layout/place_page_hotel_nearby"/> <include layout="@layout/place_page_hotel_rating"/> + + <include layout="@layout/place_page_ugc"/> <include layout="@layout/place_page_placename"/> diff --git a/android/res/layout/place_page_ugc.xml b/android/res/layout/place_page_ugc.xml new file mode 100644 index 0000000000..78974ffb69 --- /dev/null +++ b/android/res/layout/place_page_ugc.xml @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/ll__place_hotel_rating" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:visibility="gone" + tools:visibility="visible"> + <LinearLayout + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="158dp" + android:padding="@dimen/margin_base" + android:gravity="center_horizontal" + android:background="?ppRatingBackground"> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/margin_base" + android:textAppearance="@style/MwmTextAppearance.Body1" + android:textColor="?ppRatingText" + tools:text="How was it? Tap to rate."/> + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/margin_base" + android:orientation="horizontal"> + <ImageButton + android:id="@+id/one_star" + android:layout_width="40dp" + android:layout_height="40dp" + android:layout_marginRight="@dimen/margin_half" + android:layout_marginEnd="@dimen/margin_half"/> + <ImageButton + android:id="@+id/two_stars" + android:layout_marginLeft="@dimen/margin_half" + android:layout_marginStart="@dimen/margin_half" + android:layout_marginRight="@dimen/margin_half" + android:layout_marginEnd="@dimen/margin_half" + android:layout_width="40dp" + android:layout_height="40dp"/> + <ImageButton + android:id="@+id/three_stars" + android:layout_marginLeft="@dimen/margin_half" + android:layout_marginStart="@dimen/margin_half" + android:layout_marginRight="@dimen/margin_half" + android:layout_marginEnd="@dimen/margin_half" + android:layout_width="40dp" + android:layout_height="40dp"/> + <ImageButton + android:id="@+id/four_stars" + android:layout_marginLeft="@dimen/margin_half" + android:layout_marginStart="@dimen/margin_half" + android:layout_marginRight="@dimen/margin_half" + android:layout_marginEnd="@dimen/margin_half" + android:layout_width="40dp" + android:layout_height="40dp"/> + <ImageButton + android:id="@+id/five_stars" + android:layout_marginLeft="@dimen/margin_half" + android:layout_marginStart="@dimen/margin_half" + android:layout_width="40dp" + android:layout_height="40dp"/> + </LinearLayout> + <Button + android:id="@+id/write_review" + android:layout_width="match_parent" + android:layout_height="36dp" + android:textAllCaps="true" + android:text="Write a review"/> + </LinearLayout> + + <android.support.v7.widget.RecyclerView + android:id="@+id/rv__place_ugc_review" + android:layout_width="match_parent" + android:layout_height="wrap_content" + tools:listitem="@layout/item_ugc_comment"/> + <View + android:layout_width="match_parent" + android:layout_height="1dp" + android:layout_marginLeft="@dimen/margin_base" + android:layout_marginRight="@dimen/margin_base" + android:background="?dividerHorizontal"/> + <TextView + android:id="@+id/tv__place_ugc_reviews_more" + style="@style/PlacePageMetadataText.Button" + android:height="@dimen/height_block_base" + android:background="?clickableBackground" + android:gravity="center" + android:text="More reviews"/> + <include layout="@layout/divider_horizontal"/> +</LinearLayout> |