[android] Added night theme resources for place page rating block.

This commit is contained in:
Roman Romanov 2016-09-26 13:05:54 +04:00
parent 50b5ebda6e
commit edcb5ba064
13 changed files with 114 additions and 49 deletions

View file

@ -2,6 +2,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
<solid android:color="@color/bg_placepage_rating_positive"/>
<size
android:height="@dimen/margin_placepage_rating"
android:width="@dimen/margin_placepage_rating"/>
android:height="@dimen/placepage_margin_rating"
android:width="@dimen/placepage_margin_rating"/>
</shape>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/bg_placepage_rating_positive_night"/>
<size
android:height="@dimen/placepage_margin_rating"
android:width="@dimen/placepage_margin_rating"/>
</shape>

View file

@ -2,6 +2,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
<solid android:color="@color/bg_placepage_rating_negative"/>
<size
android:height="@dimen/margin_placepage_rating"
android:width="@dimen/margin_placepage_rating"/>
android:height="@dimen/placepage_margin_rating"
android:width="@dimen/placepage_margin_rating"/>
</shape>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/bg_placepage_rating_negative_night"/>
<size
android:height="@dimen/placepage_margin_rating"
android:width="@dimen/placepage_margin_rating"/>
</shape>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/bg_circle_red_night"
android:left="@dimen/margin_eighth"
android:right="@dimen/margin_eighth"
android:bottom="@dimen/margin_eighth"
android:top="@dimen/margin_eighth"/>
<item
android:drawable="@drawable/ic_minus_red"
android:left="@dimen/margin_eighth"
android:right="@dimen/margin_eighth"
android:bottom="@dimen/margin_eighth"
android:top="@dimen/margin_eighth"/>
</layer-list>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/bg_circle_green_night"
android:left="@dimen/margin_eighth"
android:right="@dimen/margin_eighth"
android:bottom="@dimen/margin_eighth"
android:top="@dimen/margin_eighth"/>
<item
android:drawable="@drawable/ic_plus_green"
android:left="@dimen/margin_eighth"
android:right="@dimen/margin_eighth"
android:bottom="@dimen/margin_eighth"
android:top="@dimen/margin_eighth"/>
</layer-list>

View file

@ -70,11 +70,11 @@
android:layout_height="wrap_content"
android:layout_below="@id/tv__comment_date">
<ImageView
android:layout_width="@dimen/margin_base_plus"
android:layout_height="@dimen/margin_base_plus"
android:layout_marginLeft="@dimen/margin_base"
android:layout_marginStart="@dimen/margin_base"
android:src="@drawable/ic_positive_review"/>
android:layout_width="@dimen/margin_base_plus"
android:layout_height="@dimen/margin_base_plus"
android:layout_marginLeft="@dimen/margin_base"
android:layout_marginStart="@dimen/margin_base"
android:src="?ppPositive"/>
<TextView
android:id="@+id/tv__positive_review"
@ -97,13 +97,13 @@
android:layout_height="wrap_content"
android:layout_below="@id/ll__positive_review">
<ImageView
android:id="@+id/iv__negative_review"
android:layout_width="@dimen/margin_base_plus"
android:layout_height="@dimen/margin_base_plus"
android:layout_marginBottom="@dimen/margin_base"
android:layout_marginLeft="@dimen/margin_base"
android:layout_marginStart="@dimen/margin_base"
android:src="@drawable/ic_negative_review"/>
android:id="@+id/iv__negative_review"
android:layout_width="@dimen/margin_base_plus"
android:layout_height="@dimen/margin_base_plus"
android:layout_marginBottom="@dimen/margin_base"
android:layout_marginLeft="@dimen/margin_base"
android:layout_marginStart="@dimen/margin_base"
android:src="?ppNegative"/>
<TextView
android:id="@+id/tv__negative_review"
@ -119,4 +119,4 @@
tools:text="Little bit noise from outsideLittle bit noise from outside"/>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>

View file

@ -1,22 +1,23 @@
<?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:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_placepage_rating"
android:paddingBottom="@dimen/margin_base"
android:paddingLeft="@dimen/margin_base"
android:paddingRight="@dimen/margin_base"
android:background="@color/bg_placepage_rating">
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/placepage_margin_rating"
android:paddingBottom="@dimen/margin_base"
android:paddingLeft="@dimen/margin_base"
android:paddingRight="@dimen/margin_base"
android:background="?ppRatingBackground">
<TextView
android:id="@+id/tv__place_hotel_rating"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.Body1"
android:textColor="@color/text_placepage_rating"
tools:text="Rating: 8.7 (Excellent)"/>
android:id="@+id/tv__place_hotel_rating"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.Body1"
android:textColor="?ppRatingText"
tools:text="Rating: 8.7 (Excellent)"/>
<TextView
android:id="@+id/tv__place_hotel_rating_base"
@ -25,4 +26,4 @@
android:layout_marginTop="@dimen/margin_half"
android:textAppearance="@style/MwmTextAppearance.Body3"
tools:text="Based on 848 hotel reviews"/>
</LinearLayout>
</LinearLayout>

View file

@ -9,22 +9,22 @@
tools:visibility="visible">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_placepage_rating"
android:paddingBottom="@dimen/margin_base"
android:paddingLeft="@dimen/margin_base"
android:paddingRight="@dimen/margin_base"
android:background="@color/bg_placepage_rating">
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/placepage_margin_rating"
android:paddingBottom="@dimen/margin_base"
android:paddingLeft="@dimen/margin_base"
android:paddingRight="@dimen/margin_base"
android:background="?ppRatingBackground">
<TextView
android:id="@+id/tv__place_hotel_rating"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.Body1"
android:textColor="@color/text_placepage_rating"
tools:text="Rating: 8.7 (Excellent)"/>
android:id="@+id/tv__place_hotel_rating"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.Body1"
android:textColor="?ppRatingText"
tools:text="Rating: 8.7 (Excellent)"/>
<TextView
android:id="@+id/tv__place_hotel_rating_base"
@ -55,4 +55,4 @@
android:background="?clickableBackground"
android:gravity="center"
android:text="@string/placepage_more_reviews_button"/>
</LinearLayout>
</LinearLayout>

View file

@ -35,6 +35,7 @@
<color name="divider_gallery">#66FFFFFF</color>
<color name="text_placepage_rating">#568B2E</color>
<color name="text_placepage_rating_night">#46A046</color>
<!-- Backgrounds -->
<color name="bg_window">#FFEEEEEE</color>
@ -63,8 +64,11 @@
<color name="fg_azimut_arrow">#FFFFFFFF</color>
<color name="bg_placepage_rating">#F1F8E9</color>
<color name="bg_placepage_rating_night">#1EF0FAEB</color>
<color name="bg_placepage_rating_positive">#DCEDC8</color>
<color name="bg_placepage_rating_positive_night">#1EF0FAEB</color>
<color name="bg_placepage_rating_negative">#FFCDD2</color>
<color name="bg_placepage_rating_negative_night">#1EFFEBF0</color>
<!-- Buttons -->
<color name="button">@color/button_normal</color>

View file

@ -154,6 +154,6 @@
<dimen name="placepage_hotel_nearby_icon_size">24dp</dimen>
<!-- Rating-->
<dimen name="margin_placepage_rating">20dp</dimen>
<dimen name="placepage_margin_rating">20dp</dimen>
</resources>

View file

@ -24,6 +24,10 @@
<attr name="ppPreviewHeadOpen" format="reference"/>
<attr name="ppPreviewHeadClosed" format="reference"/>
<attr name="ppArrowDrawable" format="reference"/>
<attr name="ppRatingBackground" format="color"/>
<attr name="ppRatingText" format="color"/>
<attr name="ppPositive" format="reference"/>
<attr name="ppNegative" format="reference"/>
<attr name="routingSlot" format="reference"/>
<attr name="routingSlotPressed" format="reference"/>

View file

@ -75,6 +75,11 @@
<item name="routingButtonHint">@color/routing_button_tint</item>
<item name="routingButtonPressedHint">@color/routing_button_pressed_tint</item>
<item name="ppRatingBackground">@color/bg_placepage_rating</item>
<item name="ppRatingText">@color/text_placepage_rating</item>
<item name="ppPositive">@drawable/ic_positive_review</item>
<item name="ppNegative">@drawable/ic_negative_review</item>
</style>
<!-- Night theme -->
@ -152,5 +157,10 @@
<item name="routingButtonHint">@color/routing_button_tint</item>
<item name="routingButtonPressedHint">@color/routing_button_pressed_tint</item>
<item name="ppRatingBackground">@color/bg_placepage_rating_night</item>
<item name="ppRatingText">@color/text_placepage_rating_night</item>
<item name="ppPositive">@drawable/ic_positive_review_night</item>
<item name="ppNegative">@drawable/ic_negative_review_night</item>
</style>
</resources>