Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArsentiy Milchakov <milcars@mapswithme.com>2016-11-16 17:41:02 +0300
committerRoman Romanov <rromanov@65gb.net>2016-11-23 11:27:39 +0300
commit08bd233dc434ea036de420a0cfebc1ce4ba48254 (patch)
treeeb42143beee430b75d5b2b64fcb5a6c4ee39f6af /android/res
parentf539abfc6da243933cfbb0d70969c27622cd6440 (diff)
[android] Place Page banners.
Diffstat (limited to 'android/res')
-rw-r--r--android/res/layout-land/place_page_details.xml8
-rw-r--r--android/res/layout-land/place_page_preview.xml152
-rw-r--r--android/res/layout/place_page_banner.xml81
-rw-r--r--android/res/layout/place_page_preview.xml41
-rw-r--r--android/res/values-ru/strings.xml1
-rw-r--r--android/res/values/colors.xml6
-rw-r--r--android/res/values/dimens.xml5
-rw-r--r--android/res/values/font_sizes.xml2
-rw-r--r--android/res/values/strings.xml1
-rw-r--r--android/res/values/styles-text.xml6
-rw-r--r--android/res/values/themes-attrs.xml3
-rw-r--r--android/res/values/themes-base.xml6
12 files changed, 309 insertions, 3 deletions
diff --git a/android/res/layout-land/place_page_details.xml b/android/res/layout-land/place_page_details.xml
index 515eac12f6..fe20cf04ab 100644
--- a/android/res/layout-land/place_page_details.xml
+++ b/android/res/layout-land/place_page_details.xml
@@ -18,6 +18,14 @@
android:orientation="vertical">
<include
+ android:id="@+id/banner"
+ layout="@layout/place_page_banner"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/placepage_banner_height"
+ android:visibility="gone"
+ tools:visibility="visible"/>
+
+ <include
layout="@layout/divider_horizontal"/>
<include
diff --git a/android/res/layout-land/place_page_preview.xml b/android/res/layout-land/place_page_preview.xml
new file mode 100644
index 0000000000..3fa1f7aeef
--- /dev/null
+++ b/android/res/layout-land/place_page_preview.xml
@@ -0,0 +1,152 @@
+<?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"
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ android:padding="@dimen/margin_base">
+
+ <include
+ android:id="@+id/downloader_status_frame"
+ layout="@layout/downloader_status"
+ android:layout_width="@dimen/downloader_status_size"
+ android:layout_height="@dimen/downloader_status_size"
+ android:layout_marginEnd="@dimen/margin_base"
+ android:layout_marginRight="@dimen/margin_base"
+ android:layout_marginTop="@dimen/margin_half"
+ android:visibility="gone"
+ tools:visibility="visible"/>
+
+ <TextView
+ android:id="@+id/tv__title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_marginTop="@dimen/margin_quarter"
+ android:layout_toEndOf="@id/downloader_status_frame"
+ android:layout_toRightOf="@id/downloader_status_frame"
+ android:ellipsize="end"
+ android:fontFamily="@string/robotoMedium"
+ android:maxLines="@integer/pp_title_lines"
+ android:textAppearance="@style/MwmTextAppearance.Title"
+ tools:background="#C0800000"
+ tools:ignore="UnusedAttribute"
+ tools:text="Title"/>
+
+ <TextView
+ android:id="@+id/tv__subtitle"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_below="@id/tv__title"
+ android:layout_marginTop="@dimen/margin_quarter"
+ android:layout_toEndOf="@id/downloader_status_frame"
+ android:layout_toLeftOf="@+id/direction_frame"
+ android:layout_toRightOf="@id/downloader_status_frame"
+ android:layout_toStartOf="@+id/direction_frame"
+ android:lines="1"
+ android:textAppearance="@style/MwmTextAppearance.Body1.Secondary"
+ tools:background="#300000F0"
+ tools:text="Subtitle, very very very very very very very long"/>
+
+ <LinearLayout
+ android:id="@+id/direction_frame"
+ android:layout_width="wrap_content"
+ android:layout_height="@dimen/direction_frame_min_height"
+ android:layout_alignParentEnd="true"
+ android:layout_alignParentRight="true"
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_below="@id/tv__title"
+ android:background="?selectableItemBackground"
+ android:gravity="center_vertical"
+ android:minHeight="@dimen/direction_frame_min_height"
+ android:orientation="horizontal"
+ tools:background="#111111F0">
+
+ <com.mapswithme.maps.widget.ArrowView
+ android:id="@+id/av__direction"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="@dimen/margin_half"
+ android:layout_marginRight="@dimen/margin_half"
+ android:scaleType="center"
+ android:src="?ppArrowDrawable"/>
+
+ <TextView
+ android:id="@+id/tv__straight_distance"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="@style/MwmTextAppearance.PlacePage.Accent"
+ tools:text="2000 km"/>
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/tv__downloader_details"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_below="@id/tv__subtitle"
+ android:layout_marginTop="@dimen/margin_quarter"
+ android:layout_toEndOf="@id/downloader_status_frame"
+ android:layout_toRightOf="@id/downloader_status_frame"
+ android:textAppearance="@style/MwmTextAppearance.Body1.Secondary"
+ android:visibility="gone"
+ tools:background="#8000F000"
+ tools:text="2.4 GB • Maps: 1"
+ tools:visibility="visible"/>
+
+ <!-- TODO set correct color when that block will be handled (now its hidden always) -->
+ <TextView
+ android:id="@+id/tv__opened_till"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_below="@id/tv__downloader_details"
+ android:layout_marginTop="@dimen/margin_quarter"
+ android:textAppearance="@style/MwmTextAppearance.Body1.Secondary"
+ android:visibility="gone"
+ tools:background="#80FFF000"
+ tools:text="Till 9 PM"
+ tools:visibility="visible"/>
+
+ <LinearLayout
+ android:id="@+id/hotel_info_frame"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_below="@id/tv__opened_till"
+ android:layout_marginTop="@dimen/margin_quarter"
+ tools:background="#8000FFFF">
+
+ <TextView
+ android:id="@+id/tv__hotel_rating"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:textAppearance="@style/MwmTextAppearance.Body1.Secondary"
+ android:textColor="@color/base_green"
+ android:textStyle="bold"
+ tools:text="Rating: 7.5"/>
+
+ <TextView
+ android:id="@+id/tv__hotel_price"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="@style/MwmTextAppearance.Body1.Secondary"
+ android:textStyle="bold"
+ tools:text="$$$"/>
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/tv__address"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_below="@id/hotel_info_frame"
+ android:layout_marginTop="@dimen/margin_half"
+ android:textAppearance="@style/MwmTextAppearance.Body1.Secondary"
+ tools:background="#60000000"
+ tools:text="Lenina str, 10"/>
+</RelativeLayout>
diff --git a/android/res/layout/place_page_banner.xml b/android/res/layout/place_page_banner.xml
new file mode 100644
index 0000000000..14781841a3
--- /dev/null
+++ b/android/res/layout/place_page_banner.xml
@@ -0,0 +1,81 @@
+<?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="@dimen/placepage_banner_height"
+ android:background="?bannerBackground"
+ tools:layout_height="wrap_content">
+
+ <ImageView
+ android:id="@+id/iv__banner_icon"
+ android:layout_width="@dimen/placepage_banner_icon_size"
+ android:layout_height="@dimen/placepage_banner_icon_size"
+ android:layout_marginTop="@dimen/margin_half_plus"
+ 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:scaleType="centerCrop"
+ android:visibility="gone"
+ tools:src="@drawable/about_logo"
+ tools:visibility="visible"
+ tools:layout_width="@dimen/placepage_banner_icon_size_full"
+ tools:layout_height="@dimen/placepage_banner_icon_size_full"
+ tools:layout_marginRight="0dp"
+ tools:layout_marginEnd="0dp"
+ tools:layout_marginTop="@dimen/margin_base"/>
+
+ <TextView
+ android:id="@+id/tv__banner_title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/margin_base"
+ android:layout_marginLeft="@dimen/margin_base"
+ android:layout_marginRight="@dimen/margin_base"
+ android:layout_toEndOf="@id/iv__banner_icon"
+ android:layout_toRightOf="@id/iv__banner_icon"
+ android:maxLines="1"
+ android:minLines="1"
+ android:textAppearance="@style/MwmTextAppearance.Body3.Primary"
+ android:fontFamily="@string/robotoMedium"
+ tools:paddingTop="0dp"
+ tools:text="Закажи одежду в интернет-магазине Wildberries."
+ tools:targetApi="jelly_bean"
+ tools:maxLines="2"/>
+
+ <TextView
+ android:id="@+id/tv__banner_message"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/tv__banner_title"
+ android:layout_marginTop="@dimen/margin_half_plus"
+ android:layout_marginLeft="@dimen/margin_base"
+ android:layout_marginRight="@dimen/margin_base"
+ android:layout_toEndOf="@id/iv__banner_icon"
+ android:layout_toRightOf="@id/iv__banner_icon"
+ android:textAppearance="@style/MwmTextAppearance.Body4"
+ android:visibility="gone"
+ tools:text="Бесплатная курьерская доставка по России!
+
+Коллекции женской, мужской и детской одежды, обуви,
+а также товары для дома и спорта. Цены."
+ tools:visibility="visible"/>
+
+ <TextView
+ android:id="@+id/tv__banner"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/tv__banner_message"
+ android:layout_marginBottom="@dimen/margin_base"
+ android:layout_marginTop="@dimen/margin_half_plus"
+ android:layout_marginLeft="@dimen/margin_base"
+ android:layout_marginRight="@dimen/margin_base"
+ android:layout_toEndOf="@id/iv__banner_icon"
+ android:layout_toRightOf="@id/iv__banner_icon"
+ android:textAppearance="@style/MwmTextAppearance.Banner"
+ android:text="@string/advertisement"
+ android:visibility="gone"
+ tools:visibility="visible"/>
+
+</RelativeLayout>
diff --git a/android/res/layout/place_page_preview.xml b/android/res/layout/place_page_preview.xml
index 87bf735f84..1b529b7126 100644
--- a/android/res/layout/place_page_preview.xml
+++ b/android/res/layout/place_page_preview.xml
@@ -6,15 +6,15 @@
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
- android:padding="@dimen/margin_base">
+ android:paddingTop="@dimen/margin_base">
<include
android:id="@+id/downloader_status_frame"
layout="@layout/downloader_status"
android:layout_width="@dimen/downloader_status_size"
android:layout_height="@dimen/downloader_status_size"
- android:layout_marginEnd="@dimen/margin_base"
- android:layout_marginRight="@dimen/margin_base"
+ android:layout_marginStart="@dimen/margin_base"
+ android:layout_marginLeft="@dimen/margin_base"
android:layout_marginTop="@dimen/margin_half"
android:visibility="gone"
tools:visibility="visible"/>
@@ -25,6 +25,10 @@
android:layout_height="wrap_content"
android:layout_alignWithParentIfMissing="true"
android:layout_marginTop="@dimen/margin_quarter"
+ android:layout_marginEnd="@dimen/margin_base"
+ android:layout_marginRight="@dimen/margin_base"
+ android:layout_marginStart="@dimen/margin_base"
+ android:layout_marginLeft="@dimen/margin_base"
android:layout_toEndOf="@id/downloader_status_frame"
android:layout_toRightOf="@id/downloader_status_frame"
android:ellipsize="end"
@@ -42,6 +46,8 @@
android:layout_alignWithParentIfMissing="true"
android:layout_below="@id/tv__title"
android:layout_marginTop="@dimen/margin_quarter"
+ android:layout_marginStart="@dimen/margin_base"
+ android:layout_marginLeft="@dimen/margin_base"
android:layout_toEndOf="@id/downloader_status_frame"
android:layout_toLeftOf="@+id/direction_frame"
android:layout_toRightOf="@id/downloader_status_frame"
@@ -55,6 +61,8 @@
android:id="@+id/direction_frame"
android:layout_width="wrap_content"
android:layout_height="@dimen/direction_frame_min_height"
+ android:layout_marginEnd="@dimen/margin_base"
+ android:layout_marginRight="@dimen/margin_base"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignWithParentIfMissing="true"
@@ -89,6 +97,10 @@
android:layout_alignWithParentIfMissing="true"
android:layout_below="@id/tv__subtitle"
android:layout_marginTop="@dimen/margin_quarter"
+ android:layout_marginEnd="@dimen/margin_base"
+ android:layout_marginRight="@dimen/margin_base"
+ android:layout_marginStart="@dimen/margin_base"
+ android:layout_marginLeft="@dimen/margin_base"
android:layout_toEndOf="@id/downloader_status_frame"
android:layout_toRightOf="@id/downloader_status_frame"
android:textAppearance="@style/MwmTextAppearance.Body1.Secondary"
@@ -105,6 +117,10 @@
android:layout_alignWithParentIfMissing="true"
android:layout_below="@id/tv__downloader_details"
android:layout_marginTop="@dimen/margin_quarter"
+ android:layout_marginEnd="@dimen/margin_base"
+ android:layout_marginRight="@dimen/margin_base"
+ android:layout_marginStart="@dimen/margin_base"
+ android:layout_marginLeft="@dimen/margin_base"
android:textAppearance="@style/MwmTextAppearance.Body1.Secondary"
android:visibility="gone"
tools:background="#80FFF000"
@@ -118,6 +134,10 @@
android:layout_alignWithParentIfMissing="true"
android:layout_below="@id/tv__opened_till"
android:layout_marginTop="@dimen/margin_quarter"
+ android:layout_marginEnd="@dimen/margin_base"
+ android:layout_marginRight="@dimen/margin_base"
+ android:layout_marginStart="@dimen/margin_base"
+ android:layout_marginLeft="@dimen/margin_base"
tools:background="#8000FFFF">
<TextView
@@ -146,8 +166,23 @@
android:layout_alignWithParentIfMissing="true"
android:layout_below="@id/hotel_info_frame"
android:layout_marginTop="@dimen/margin_half"
+ android:layout_marginEnd="@dimen/margin_base"
+ android:layout_marginRight="@dimen/margin_base"
+ android:layout_marginStart="@dimen/margin_base"
+ android:layout_marginLeft="@dimen/margin_base"
android:textAppearance="@style/MwmTextAppearance.Body1.Secondary"
tools:background="#60000000"
tools:text="Lenina str, 10"/>
+
+ <include
+ android:id="@+id/banner"
+ layout="@layout/place_page_banner"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/placepage_banner_height"
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_below="@id/tv__address"
+ android:layout_marginTop="@dimen/margin_base"
+ android:visibility="gone"
+ tools:visibility="visible"/>
</RelativeLayout>
diff --git a/android/res/values-ru/strings.xml b/android/res/values-ru/strings.xml
index 73e24d99e7..7a165e1985 100644
--- a/android/res/values-ru/strings.xml
+++ b/android/res/values-ru/strings.xml
@@ -1006,4 +1006,5 @@
<string name="whatsnew_uber_message">Закажите такси прямо из приложения!</string>
<string name="dialog_taxi_offline">Заказ такси недоступен офлайн.</string>
<string name="dialog_taxi_error">Заказ такси временно недоступен.</string>
+ <string name="advertisement">Реклама</string>
</resources>
diff --git a/android/res/values/colors.xml b/android/res/values/colors.xml
index 814be0823f..0c5c9d7d38 100644
--- a/android/res/values/colors.xml
+++ b/android/res/values/colors.xml
@@ -147,4 +147,10 @@
<color name="bg_brand_opentable">#FFDA3743</color>
<color name="bg_brand_opentable_pressed">#FFFC5965</color>
+ <!-- Banner colors-->
+ <color name="bg_banner_color">#FFF8E1</color>
+ <color name="bg_banner_color_night">#555A5A</color>
+ <color name="text_banner_color">#28000000</color>
+ <color name="text_banner_color_night">#28FFFFFF</color>
+
</resources>
diff --git a/android/res/values/dimens.xml b/android/res/values/dimens.xml
index c5bb871d90..f47d8f5ca3 100644
--- a/android/res/values/dimens.xml
+++ b/android/res/values/dimens.xml
@@ -160,4 +160,9 @@
<!-- Compass offset-->
<dimen name="compass_navigation_landscape_offset">-54dp</dimen>
+ <!-- Banner-->
+ <dimen name="placepage_banner_height">46dp</dimen>
+ <dimen name="placepage_banner_icon_size">22dp</dimen>
+ <dimen name="placepage_banner_icon_size_full">40dp</dimen>
+
</resources>
diff --git a/android/res/values/font_sizes.xml b/android/res/values/font_sizes.xml
index 90f27baf3f..3e984fe207 100644
--- a/android/res/values/font_sizes.xml
+++ b/android/res/values/font_sizes.xml
@@ -43,4 +43,6 @@
<dimen name="text_size_nav_circle_exit">12sp</dimen>
<dimen name="text_size_nav_number">24sp</dimen>
<dimen name="text_size_nav_dimension">20sp</dimen>
+
+ <dimen name="text_size_banner">8sp</dimen>
</resources>
diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml
index 2e1157ff28..5fcc0f8fdb 100644
--- a/android/res/values/strings.xml
+++ b/android/res/values/strings.xml
@@ -1010,4 +1010,5 @@
<string name="whatsnew_uber_message">Order a taxi directly from the app!</string>
<string name="dialog_taxi_offline">Taxi ordering is unavailable in offline mode.</string>
<string name="dialog_taxi_error">Taxi ordering is temporarily unavailable.</string>
+ <string name="advertisement">Advertisement</string>
</resources>
diff --git a/android/res/values/styles-text.xml b/android/res/values/styles-text.xml
index dc016d2b54..4786559b79 100644
--- a/android/res/values/styles-text.xml
+++ b/android/res/values/styles-text.xml
@@ -171,4 +171,10 @@
<style name="MwmTextAppearance.Editor.Buttons">
<item name="android:textSize">@dimen/text_size_body_3</item>
</style>
+
+ <style name="MwmTextAppearance.Banner" parent="MwmTextAppearance.Body4">
+ <item name="android:textSize">@dimen/text_size_banner</item>
+ <item name="android:textAllCaps">true</item>
+ <item name="android:textColor">?bannerText</item>
+ </style>
</resources>
diff --git a/android/res/values/themes-attrs.xml b/android/res/values/themes-attrs.xml
index 8f718bdbf8..181b6e787e 100644
--- a/android/res/values/themes-attrs.xml
+++ b/android/res/values/themes-attrs.xml
@@ -66,6 +66,9 @@
<attr name="routingButtonHint" format="color"/>
<attr name="routingButtonPressedHint" format="color"/>
<attr name="routingButtonActivatedHint" format="color"/>
+
+ <attr name="bannerText" format="color"/>
+ <attr name="bannerBackground" format="color"/>
</declare-styleable>
<declare-styleable name="ThemeAttrs.NavButtons">
diff --git a/android/res/values/themes-base.xml b/android/res/values/themes-base.xml
index 9cdefefbc4..bca68417c1 100644
--- a/android/res/values/themes-base.xml
+++ b/android/res/values/themes-base.xml
@@ -82,6 +82,9 @@
<item name="ppRatingText">@color/text_placepage_rating</item>
<item name="ppPositive">@drawable/ic_positive_review</item>
<item name="ppNegative">@drawable/ic_negative_review</item>
+
+ <item name="bannerText">@color/text_banner_color</item>
+ <item name="bannerBackground">@color/bg_banner_color</item>
</style>
<!-- Night theme -->
@@ -167,5 +170,8 @@
<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>
+
+ <item name="bannerText">@color/text_banner_color_night</item>
+ <item name="bannerBackground">@color/bg_banner_color_night</item>
</style>
</resources> \ No newline at end of file