[android] Editor UI.

This commit is contained in:
Dmitry Yunitsky 2016-01-11 19:28:50 +03:00 committed by Sergey Yershov
parent cbb993e526
commit 58112d07dd
38 changed files with 978 additions and 400 deletions

View file

@ -2,10 +2,10 @@
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<!--<item-->
<!--android:color="@color/base_blue_light"-->
<!--android:state_selected="true"/>-->
<item
android:color="@color/base_accent"
android:state_selected="true"/>
<!--<item-->
<!--android:color="@color/text_dark_subtitle"/>-->
<item
android:color="@color/text_dark_subtitle"/>
</selector>

View file

@ -2,10 +2,10 @@
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<!--<item-->
<!--android:color="@color/base_blue_light"-->
<!--android:state_selected="true"/>-->
<item
android:color="@color/base_accent_pressed"
android:state_selected="true"/>
<!--<item-->
<!--android:color="@color/base_blue_lightest"/>-->
<item
android:color="@color/base_accent"/>
</selector>

View file

@ -2,10 +2,10 @@
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<!--<item-->
<!--android:drawable="@color/base_blue_light"-->
<!--android:state_enabled="true"/>-->
<item
android:drawable="@color/bg_editor_add_enabled"
android:state_enabled="true"/>
<!--<item-->
<!--android:drawable="@color/editor_complement_disabled"/>-->
<item
android:drawable="@color/bg_editor_add_disabled"/>
</selector>

View file

@ -3,48 +3,46 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.mapswithme.maps.widget.ObservableScrollView
android:id="@+id/pp__details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?ppBackground"
android:overScrollMode="never">
android:id="@+id/pp__details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?ppBackground"
android:overScrollMode="never">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false">
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:paddingLeft="@dimen/margin_base_plus"
android:paddingRight="@dimen/margin_base_plus"
android:background="?attr/dividerHorizontal"/>
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dividerHorizontal"
android:paddingLeft="@dimen/margin_base_plus"
android:paddingRight="@dimen/margin_base_plus"/>
<RelativeLayout
android:id="@+id/rl__details_attrs"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/margin_base_plus"
android:paddingRight="@dimen/margin_base_plus"
android:paddingBottom="@dimen/margin_half"
android:paddingTop="@dimen/margin_half">
android:id="@+id/rl__details_attrs"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/margin_half"
android:paddingLeft="@dimen/margin_base_plus"
android:paddingRight="@dimen/margin_base_plus"
android:paddingTop="@dimen/margin_half">
<View
android:id="@+id/anchor_center"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/margin_base"
android:layout_marginRight="@dimen/margin_base"/>
android:id="@+id/anchor_center"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/margin_base"
android:layout_marginRight="@dimen/margin_base"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/anchor_center"
android:orientation="vertical">
<include layout="@layout/place_page_editor"/>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/anchor_center"
android:orientation="vertical">
<include layout="@layout/place_page_placename"/>
<include layout="@layout/place_page_entrance"/>
@ -54,16 +52,18 @@
<include layout="@layout/place_page_website"/>
<include layout="@layout/place_page_wiki"/>
<include layout="@layout/place_page_editor"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/anchor_center"
android:orientation="vertical">
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/anchor_center"
android:orientation="vertical">
<include layout="@layout/place_page_email"/>
<include layout="@layout/place_page_schedule"/>
<include layout="@layout/item_opening_hours"/>
<include layout="@layout/place_page_latlon"/>
@ -76,12 +76,12 @@
</RelativeLayout>
<include
layout="@layout/place_page_bookmark_details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/margin_base_plus"
android:layout_marginRight="@dimen/margin_base_plus"
android:layout_below="@id/rl__details_attrs"/>
layout="@layout/place_page_bookmark_details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/rl__details_attrs"
android:layout_marginLeft="@dimen/margin_base_plus"
android:layout_marginRight="@dimen/margin_base_plus"/>
</RelativeLayout>
</com.mapswithme.maps.widget.ObservableScrollView>

View file

@ -0,0 +1,319 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".editor.EditorActivity"
tools:ignore="DuplicateIds">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v7.widget.CardView
android:id="@+id/cv__name"
style="@style/MwmWidget.Editor.CardView">
<LinearLayout
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_base"
android:orientation="vertical"
android:paddingEnd="@dimen/margin_base"
android:paddingLeft="@dimen/margin_base"
android:paddingRight="@dimen/margin_base"
android:paddingStart="@dimen/margin_base">
<com.mapswithme.maps.widget.CustomTextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/input"
style="@style/MwmWidget.Editor.FieldLayout.EditText"
android:hint="@string/name"
android:singleLine="true"/>
</com.mapswithme.maps.widget.CustomTextInputLayout>
<TextView
android:id="@+id/name_multilang"
android:layout_width="match_parent"
android:layout_height="@dimen/base_block_size"
android:background="?clickableBackground"
android:drawableEnd="@drawable/ic_arrow_down"
android:drawableRight="@drawable/ic_arrow_down"
android:gravity="center_vertical"
android:text="Multilanguages"
android:textAppearance="@style/MwmTextAppearance.Body3"/>
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id="@+id/cv__address"
style="@style/MwmWidget.Editor.CardView">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingEnd="@dimen/margin_base"
android:paddingLeft="@dimen/margin_base"
android:paddingRight="@dimen/margin_base"
android:paddingStart="@dimen/margin_base">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_base"
android:fontFamily="@string/robotoMedium"
android:text="@string/address"
android:textAppearance="@style/MwmTextAppearance.Body3"
tools:ignore="UnusedAttribute"/>
<RelativeLayout
style="@style/MwmWidget.Editor.MetadataBlock"
android:background="?clickableBackground"
android:paddingBottom="@dimen/margin_half"
android:paddingTop="@dimen/margin_half">
<ImageView
style="@style/MwmWidget.Editor.MetadataIcon"
android:src="@drawable/ic_coordinates"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/editor_margin_left"
android:layout_marginStart="@dimen/editor_margin_left"
android:gravity="center_vertical"
android:text="Street"
android:textAppearance="@style/MwmTextAppearance.Body4"/>
<TextView
android:id="@+id/street"
style="@style/MwmWidget.Editor.FieldLayout"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/margin_base"
android:background="?clickableBackground"
android:drawableEnd="@drawable/ic_arrow_down"
android:drawableRight="@drawable/ic_arrow_down"
android:gravity="center_vertical"
android:textAppearance="@style/MwmTextAppearance.Body1"
tools:text="Red str."/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignLeft="@id/street"
android:layout_alignParentBottom="true"
android:layout_alignStart="@id/street"
android:layout_marginBottom="@dimen/margin_half"
android:background="@color/divider"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/building"
style="@style/MwmWidget.Editor.MetadataBlock">
<com.mapswithme.maps.widget.CustomTextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerVertical="true"
android:layout_marginLeft="54dp"
android:layout_marginStart="54dp">
<EditText
android:id="@+id/input"
style="@style/MwmWidget.Editor.FieldLayout.EditText"
android:hint="building"
tools:text="79-59"/>
</com.mapswithme.maps.widget.CustomTextInputLayout>
</RelativeLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id="@+id/cv__metadata"
style="@style/MwmWidget.Editor.CardView">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingEnd="@dimen/margin_base"
android:paddingLeft="@dimen/margin_base"
android:paddingRight="@dimen/margin_base"
android:paddingStart="@dimen/margin_base">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_base"
android:fontFamily="@string/robotoMedium"
android:text="Details"
android:textAppearance="@style/MwmTextAppearance.Body3"
tools:ignore="UnusedAttribute"/>
<include
android:id="@+id/opening_hours"
layout="@layout/item_opening_hours"/>
<TextView
android:id="@+id/tv__edit_oh"
style="@style/MwmWidget.Editor.FieldLayout"
android:background="?clickableBackground"
android:gravity="center_vertical"
android:minHeight="@dimen/base_block_size"
android:text="Edit opening hours"
android:textAllCaps="true"
android:textAppearance="@style/MwmTextAppearance.Body1"
android:textColor="?colorAccent"/>
<RelativeLayout
android:id="@+id/block_phone"
style="@style/MwmWidget.Editor.MetadataBlock">
<ImageView
style="@style/MwmWidget.Editor.MetadataIcon"
android:src="@drawable/ic_phone"/>
<com.mapswithme.maps.widget.CustomTextInputLayout
style="@style/MwmWidget.Editor.FieldLayout"
android:layout_centerVertical="true">
<EditText
android:id="@+id/input"
style="@style/MwmWidget.Editor.FieldLayout.EditText"
android:hint="phone"
android:textAppearance="@style/MwmTextAppearance.Body1"
tools:text="+937 99 92"/>
</com.mapswithme.maps.widget.CustomTextInputLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/block_website"
style="@style/MwmWidget.Editor.MetadataBlock">
<ImageView
style="@style/MwmWidget.Editor.MetadataIcon"
android:src="@drawable/ic_website"/>
<com.mapswithme.maps.widget.CustomTextInputLayout
style="@style/MwmWidget.Editor.FieldLayout"
android:layout_centerVertical="true">
<EditText
android:id="@+id/input"
style="@style/MwmWidget.Editor.FieldLayout.EditText"
android:hint="web"
android:textAppearance="@style/MwmTextAppearance.Body1"
tools:text="maps.me"/>
</com.mapswithme.maps.widget.CustomTextInputLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/block_email"
style="@style/MwmWidget.Editor.MetadataBlock">
<ImageView
style="@style/MwmWidget.Editor.MetadataIcon"
android:src="@drawable/ic_email"/>
<com.mapswithme.maps.widget.CustomTextInputLayout
style="@style/MwmWidget.Editor.FieldLayout"
android:layout_centerVertical="true">
<EditText
android:id="@+id/input"
style="@style/MwmWidget.Editor.FieldLayout.EditText"
android:hint="email"
android:textAppearance="@style/MwmTextAppearance.Body1"
tools:text="bugs@maps.me"/>
</com.mapswithme.maps.widget.CustomTextInputLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/block_cuisine"
style="@style/MwmWidget.Editor.MetadataBlock"
android:paddingBottom="@dimen/margin_half"
android:paddingTop="@dimen/margin_half">
<ImageView
style="@style/MwmWidget.Editor.MetadataIcon"
android:src="@drawable/ic_cuisine"/>
<TextView
android:id="@+id/tv__cuisine"
style="@style/MwmWidget.Editor.FieldLayout"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/margin_base"
android:drawableRight="@drawable/ic_arrow_down"
android:gravity="center_vertical"
android:textAppearance="@style/MwmTextAppearance.Body1"
tools:text="Italian, russian."/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignLeft="@id/tv__cuisine"
android:layout_alignParentBottom="true"
android:layout_alignStart="@id/tv__cuisine"
android:layout_marginBottom="@dimen/margin_half"
android:background="@color/divider"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/block_wifi"
style="@style/MwmWidget.Editor.MetadataBlock"
android:background="?clickableBackground">
<ImageView
style="@style/MwmWidget.Editor.MetadataIcon"
android:src="@drawable/ic_wifi"/>
<TextView
style="@style/MwmWidget.Editor.FieldLayout.EditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/editor_margin_left"
android:layout_marginStart="@dimen/editor_margin_left"
android:layout_toLeftOf="@+id/sw__wifi"
android:layout_toStartOf="@+id/sw__wifi"
android:text="Wi-Fi"/>
<android.support.v7.widget.SwitchCompat
android:id="@+id/sw__wifi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"/>
</RelativeLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</ScrollView>

View file

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
style="@style/MwmWidget.ToolbarStyle"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:gravity="end|center_vertical"
android:theme="@style/MwmWidget.ToolbarTheme">
<ImageView
android:id="@+id/save"
android:layout_width="?actionBarSize"
android:layout_height="?actionBarSize"
android:layout_gravity="end|center_vertical"
android:background="?selectableItemBackgroundBorderless"
android:scaleType="center"
android:src="@drawable/ic_toolbar_check"/>
</android.support.v7.widget.Toolbar>
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?panel"/>
</LinearLayout>

View file

@ -4,26 +4,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
style="@style/MwmWidget.ToolbarStyle"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:gravity="end"
android:theme="@style/MwmWidget.ToolbarTheme">
<ImageView
android:id="@+id/iv__submit"
android:layout_width="?actionBarSize"
android:layout_height="?actionBarSize"
android:layout_gravity="end|center_vertical"
android:background="?selectableItemBackgroundBorderless"
android:padding="@dimen/margin_half_plus"
android:scaleType="center"
android:src="@drawable/ic_toolbar_check"/>
</android.support.v7.widget.Toolbar>
<FrameLayout
android:id="@+id/fragment_container"
style="@style/MwmWidget.FrameLayout.Elevation"
@ -31,20 +11,25 @@
android:layout_height="match_parent"
android:layout_above="@+id/tv__mode_switch"
android:layout_below="@id/toolbar"/>
<!--android:background="@color/editor_background"/>-->
<View
android:layout_width="match_parent"
android:layout_height="@dimen/base_block_size"
android:layout_alignParentBottom="true"
android:background="@android:color/white"/>
<TextView
android:id="@+id/tv__mode_switch"
android:layout_width="match_parent"
android:layout_height="@dimen/base_block_size"
android:layout_alignParentBottom="true"
android:background="?selectableItemBackground"
android:background="?clickableBackground"
android:gravity="center_vertical"
android:padding="@dimen/margin_base"
android:text="@string/editor_time_advanced"
android:textAllCaps="true"
android:textAppearance="@style/MwmTextAppearance.Body3"/>
<!--android:textColor="@color/base_blue_light"/>-->
android:textAppearance="@style/MwmTextAppearance.Body3"
android:textColor="?colorAccent"/>
<include
layout="@layout/shadow_bottom"

View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/ll__place_schedule"
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:background="?attr/clickableBackground"
android:gravity="center_vertical"
android:minHeight="@dimen/base_block_size"
android:paddingEnd="@dimen/margin_base"
android:paddingLeft="@dimen/margin_half"
android:paddingRight="@dimen/margin_base"
android:paddingStart="@dimen/margin_half"
android:tag="schedule"
android:visibility="gone"
tools:visibility="visible">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/margin_base_plus"
android:layout_marginRight="@dimen/margin_base_plus"
android:layout_marginTop="@dimen/margin_half_plus"
android:src="@drawable/ic_operating_hours"
android:tint="?iconTint"/>
<EditText
android:id="@+id/et__empty_schedule"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/editor_margin_left"
android:layout_marginStart="@dimen/editor_margin_left"
android:enabled="false"
android:hint="Opening hours"
android:visibility="gone"
tools:visibility="visible"/>
<TextView
android:id="@+id/tv__today_schedule"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="14dp"
android:layout_marginLeft="@dimen/editor_margin_left"
android:layout_marginStart="@dimen/editor_margin_left"
android:layout_marginTop="14dp"
android:textAppearance="@style/MwmTextAppearance.PlacePage"
android:visibility="gone"
tools:text="Today 16:00-18.00"
tools:textColor="@color/base_red"/>
<TextView
android:id="@+id/tv__place_schedule"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv__today_schedule"
android:layout_marginLeft="@dimen/editor_margin_left"
android:layout_marginStart="@dimen/editor_margin_left"
android:layout_marginTop="14dp"
android:textAppearance="@style/MwmTextAppearance.PlacePage"
tools:text="Mo-Fr 16:00-18.00"
tools:visibility="gone"/>
</RelativeLayout>

View file

@ -18,21 +18,20 @@
android:layout_gravity="center_vertical"
android:baselineAligned="false"
android:orientation="horizontal"
android:padding="@dimen/margin_half_plus"
tools:ignore="DuplicateIds">
android:padding="@dimen/margin_half_plus">
<LinearLayout
android:id="@+id/day1"
style="@style/Editor.DayLayout">
style="@style/MwmWidget.Editor.DayLayout">
<TextView
android:id="@+id/tv__day"
style="@style/Editor.DayText"
style="@style/MwmWidget.Editor.DayText"
tools:text="Su"/>
<CheckBox
android:id="@+id/chb__day"
style="@style/Editor.DayCheckBox"/>
style="@style/MwmWidget.Editor.DayCheckBox"/>
</LinearLayout>
@ -43,16 +42,16 @@
<LinearLayout
android:id="@+id/day2"
style="@style/Editor.DayLayout"
style="@style/MwmWidget.Editor.DayLayout"
android:layout_weight="1">
<TextView
android:id="@+id/tv__day"
style="@style/Editor.DayText"
android:id="@id/tv__day"
style="@style/MwmWidget.Editor.DayText"
tools:text="Mo"/>
<CheckBox
android:id="@+id/chb__day"
android:id="@id/chb__day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
@ -60,16 +59,16 @@
<LinearLayout
android:id="@+id/day3"
style="@style/Editor.DayLayout"
style="@style/MwmWidget.Editor.DayLayout"
android:layout_weight="1">
<TextView
android:id="@+id/tv__day"
style="@style/Editor.DayText"
android:id="@id/tv__day"
style="@style/MwmWidget.Editor.DayText"
tools:text="Tu"/>
<CheckBox
android:id="@+id/chb__day"
android:id="@id/chb__day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
@ -77,16 +76,16 @@
<LinearLayout
android:id="@+id/day4"
style="@style/Editor.DayLayout"
style="@style/MwmWidget.Editor.DayLayout"
android:layout_weight="1">
<TextView
android:id="@+id/tv__day"
style="@style/Editor.DayText"
android:id="@id/tv__day"
style="@style/MwmWidget.Editor.DayText"
tools:text="We"/>
<CheckBox
android:id="@+id/chb__day"
android:id="@id/chb__day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
@ -94,16 +93,16 @@
<LinearLayout
android:id="@+id/day5"
style="@style/Editor.DayLayout"
style="@style/MwmWidget.Editor.DayLayout"
android:layout_weight="1">
<TextView
android:id="@+id/tv__day"
style="@style/Editor.DayText"
android:id="@id/tv__day"
style="@style/MwmWidget.Editor.DayText"
tools:text="Th"/>
<CheckBox
android:id="@+id/chb__day"
android:id="@id/chb__day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
@ -111,16 +110,16 @@
<LinearLayout
android:id="@+id/day6"
style="@style/Editor.DayLayout"
style="@style/MwmWidget.Editor.DayLayout"
android:layout_weight="1">
<TextView
android:id="@+id/tv__day"
style="@style/Editor.DayText"
android:id="@id/tv__day"
style="@style/MwmWidget.Editor.DayText"
tools:text="Fr"/>
<CheckBox
android:id="@+id/chb__day"
android:id="@id/chb__day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
@ -133,15 +132,15 @@
<LinearLayout
android:id="@+id/day7"
style="@style/Editor.DayLayout">
style="@style/MwmWidget.Editor.DayLayout">
<TextView
android:id="@+id/tv__day"
style="@style/Editor.DayText"
android:id="@id/tv__day"
style="@style/MwmWidget.Editor.DayText"
tools:text="Sa"/>
<CheckBox
android:id="@+id/chb__day"
android:id="@id/chb__day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
@ -152,7 +151,7 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"/>
<!--android:background="@color/divider_standard"/>-->
<!--android:background="@color/divider_standard"/>-->
<LinearLayout
android:id="@+id/allday"
@ -188,8 +187,8 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"/>
<!--android:background="@color/divider_standard"/>-->
android:layout_height="1dp"
android:background="@color/divider"/>
<LinearLayout
android:id="@+id/time_open_close"
@ -253,8 +252,9 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"/>
<!--android:background="@color/divider_standard"/>-->
android:layout_height="1dp"
android:background="@color/divider"/>
<LinearLayout
android:id="@+id/closed_host"
@ -270,8 +270,8 @@
android:padding="@dimen/margin_half_plus"
android:text="@string/editor_time_add_closed"
android:textAllCaps="true"
android:textAppearance="@style/MwmTextAppearance.Body1"/>
<!--android:textColor="@color/base_blue_light"/>-->
android:textAppearance="@style/MwmTextAppearance.Body1"
android:textColor="?colorAccent"/>
</LinearLayout>

View file

@ -1,99 +1,105 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
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:layout_marginTop="@dimen/margin_base"
android:paddingLeft="@dimen/margin_half_plus"
android:paddingRight="@dimen/margin_half_plus"
android:background="?ppButtonsBackground"
android:clickable="true">
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:layout_marginTop="@dimen/margin_base"
android:background="?ppButtonsBackground"
android:clickable="true"
android:paddingLeft="@dimen/margin_half_plus"
android:paddingRight="@dimen/margin_half_plus">
<LinearLayout
android:id="@+id/general"
android:layout_width="match_parent"
android:layout_height="@dimen/place_page_buttons_height"
android:orientation="horizontal"
tools:ignore="UseCompoundDrawables">
android:id="@+id/general"
android:layout_width="match_parent"
android:layout_height="@dimen/place_page_buttons_height"
android:orientation="horizontal"
tools:ignore="UseCompoundDrawables">
<LinearLayout
android:id="@+id/ll__api_back"
style="@style/PlacePageButton">
android:id="@+id/ll__api_back"
style="@style/PlacePageButton">
<ImageView
style="@style/PlacePageButtonImage"
android:contentDescription="@string/back"
android:src="?homeAsUpIndicator"/>
style="@style/PlacePageButtonImage"
android:contentDescription="@string/back"
android:src="?homeAsUpIndicator" />
<TextView
style="@style/PlacePageButtonText"
android:text="@string/back"/>
style="@style/PlacePageButtonText"
android:text="@string/back" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll__share"
style="@style/PlacePageButton">
android:id="@+id/ll__share"
style="@style/PlacePageButton">
<ImageView
style="@style/PlacePageButtonImage"
android:contentDescription="@string/share"
android:src="@drawable/ic_share"/>
style="@style/PlacePageButtonImage"
android:contentDescription="@string/share"
android:src="@drawable/ic_share" />
<TextView
style="@style/PlacePageButtonText"
android:text="@string/share"/>
style="@style/PlacePageButtonText"
android:text="@string/share" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll__bookmark"
style="@style/PlacePageButton">
android:id="@+id/ll__bookmark"
style="@style/PlacePageButton">
<ImageView
android:id="@+id/iv__bookmark"
style="@style/PlacePageButtonImage"
android:tint="@null"
android:contentDescription="@string/bookmark"
android:src="@drawable/ic_bookmarks_off"/>
android:id="@+id/iv__bookmark"
style="@style/PlacePageButtonImage"
android:contentDescription="@string/bookmark"
android:src="@drawable/ic_bookmarks_off"
android:tint="@null" />
<TextView
style="@style/PlacePageButtonText"
android:text="@string/bookmark"/>
style="@style/PlacePageButtonText"
android:text="@string/bookmark" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll__route"
style="@style/PlacePageButton">
android:id="@+id/ll__route"
style="@style/PlacePageButton">
<ImageView
style="@style/PlacePageButtonImage"
android:contentDescription="@string/route"
android:src="@drawable/ic_route"/>
style="@style/PlacePageButtonImage"
android:contentDescription="@string/route"
android:src="@drawable/ic_route" />
<TextView
style="@style/PlacePageButtonText"
android:text="@string/route"/>
style="@style/PlacePageButtonText"
android:text="@string/route" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/routing"
android:layout_width="match_parent"
android:layout_height="@dimen/place_page_buttons_height"
android:orientation="horizontal"
android:visibility="gone"
tools:visibility="visible"
tools:layout_marginTop="60dp">
android:id="@+id/routing"
android:layout_width="match_parent"
android:layout_height="@dimen/place_page_buttons_height"
android:orientation="horizontal"
android:visibility="gone"
tools:layout_marginTop="60dp"
tools:visibility="visible">
<TextView
android:id="@+id/from"
style="@style/PlacePageButtonText.Route"
android:text="@string/p2p_from_here"/>
android:id="@+id/from"
style="@style/PlacePageButtonText.Route"
android:text="@string/p2p_from_here" />
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:background="@color/divider"/>
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginBottom="2dp"
android:layout_marginTop="2dp"
android:background="@color/divider" />
<TextView
android:id="@+id/to"
style="@style/PlacePageButtonText.Route"
android:text="@string/p2p_to_here"/>
android:id="@+id/to"
style="@style/PlacePageButtonText.Route"
android:text="@string/p2p_to_here" />
</LinearLayout>
</FrameLayout>

View file

@ -4,7 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/ll__place_cuisine"
style="@style/PlacePageItemFrame"
android:tag="schedule"
android:tag="cuisine"
android:visibility="gone"
tools:visibility="visible">
<ImageView
android:layout_width="wrap_content"

View file

@ -4,29 +4,29 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.mapswithme.maps.widget.ObservableScrollView
android:id="@+id/pp__details"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?ppBackground"
android:overScrollMode="never">
android:id="@+id/pp__details"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?ppBackground"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="@dimen/margin_base_plus"
android:paddingRight="@dimen/margin_base_plus"
android:paddingTop="@dimen/margin_base">
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="@dimen/margin_base_plus"
android:paddingRight="@dimen/margin_base_plus"
android:paddingTop="@dimen/margin_base">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="@dimen/margin_half"
android:background="?attr/dividerHorizontal"/>
<include layout="@layout/place_page_editor"/>
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="@dimen/margin_half"
android:background="?attr/dividerHorizontal"/>
<include layout="@layout/place_page_placename"/>
<include layout="@layout/item_opening_hours"/>
<include layout="@layout/place_page_entrance"/>
<include layout="@layout/place_page_phone"/>
@ -37,8 +37,6 @@
<include layout="@layout/place_page_email"/>
<include layout="@layout/place_page_schedule"/>
<include layout="@layout/place_page_latlon"/>
<include layout="@layout/place_page_wifi"/>
@ -47,14 +45,16 @@
<include layout="@layout/place_page_cuisine"/>
<include layout="@layout/place_page_editor"/>
<Space
android:layout_width="match_parent"
android:layout_height="@dimen/margin_half"/>
android:layout_width="match_parent"
android:layout_height="@dimen/margin_half"/>
<include
layout="@layout/place_page_bookmark_details"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
layout="@layout/place_page_bookmark_details"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
</com.mapswithme.maps.widget.ObservableScrollView>

View file

@ -2,25 +2,20 @@
<LinearLayout
android:id="@+id/ll__place_editor"
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:background="?attr/clickableBackground"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingBottom="@dimen/margin_half"
android:paddingTop="@dimen/margin_half"
xmlns:tools="http://schemas.android.com/tools">
android:paddingTop="@dimen/margin_half">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_base"
style="@style/PlacePageMetadataIcon"
android:src="@drawable/ic_edit"/>
<TextView
android:id="@+id/tv__editor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/text_size_body_1"
style="@style/PlacePageMetadataText"
tools:text="@string/pp_place_add"/>
<!--android:textColor="@color/text_place_page"-->
</LinearLayout>

View file

@ -5,20 +5,17 @@
android:id="@+id/ll__place_email"
style="@style/PlacePageItemFrame"
android:tag="email"
tools:visibility="visible"
tools:background="#200000FF">
tools:background="#200000FF"
tools:visibility="visible">
<ImageView
android:id="@+id/iv__place_email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_base"
android:src="@drawable/ic_email"
android:tint="?colorAccent"/>
style="@style/PlacePageMetadataIcon"
android:src="@drawable/ic_email" />
<TextView
android:id="@+id/tv__place_email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/PlacePageMetadataText"
android:textAppearance="@style/MwmTextAppearance.PlacePage.Accent"
tools:text="email@maps.me"/>
tools:text="email@maps.me" />
</LinearLayout>

View file

@ -1,22 +1,17 @@
<?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_entrance"
style="@style/PlacePageItemFrame"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:background="#40FF0000"
tools:visibility="visible">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_base"
android:src="@drawable/ic_entrance"
android:tint="?iconTint"/>
style="@style/PlacePageMetadataIcon"
android:src="@drawable/ic_entrance"/>
<TextView
android:id="@+id/tv__place_entrance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.PlacePage"
style="@style/PlacePageMetadataText"
tools:text="150 - 200"/>
</LinearLayout>

View file

@ -4,21 +4,17 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/ll__place_latlon"
style="@style/PlacePageItemFrame"
android:visibility="visible"
android:tag="latlon"
android:visibility="visible"
tools:background="#20FF0000">
<ImageView
android:id="@+id/iv__place_latlon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_base"
android:src="@drawable/ic_coordinates"
android:tint="?iconTint"/>
style="@style/PlacePageMetadataIcon"
android:src="@drawable/ic_coordinates" />
<TextView
android:id="@+id/tv__place_latlon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.PlacePage"
tools:text="55.747, 37.616"/>
style="@style/PlacePageMetadataText"
tools:text="55.747, 37.616" />
</LinearLayout>

View file

@ -5,20 +5,16 @@
android:id="@+id/ll__place_operator"
style="@style/PlacePageItemFrame"
android:tag="operator"
tools:visibility="visible"
tools:background="#4000FFFF">
tools:background="#4000FFFF"
tools:visibility="visible">
<ImageView
android:id="@+id/iv__place_operator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_base"
android:src="@drawable/ic_bank"
android:tint="?iconTint"/>
style="@style/PlacePageMetadataIcon"
android:src="@drawable/ic_bank" />
<TextView
android:id="@+id/tv__place_operator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.PlacePage"
tools:text="Operator"/>
style="@style/PlacePageMetadataText"
tools:text="Operator" />
</LinearLayout>

View file

@ -5,20 +5,17 @@
android:id="@+id/ll__place_phone"
style="@style/PlacePageItemFrame"
android:tag="phone"
tools:visibility="visible"
tools:background="#2000FF00">
tools:background="#2000FF00"
tools:visibility="visible">
<ImageView
android:id="@+id/iv__place_phone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_base"
android:src="@drawable/ic_phone"
android:tint="?colorAccent"/>
style="@style/PlacePageMetadataIcon"
android:src="@drawable/ic_phone" />
<TextView
android:id="@+id/tv__place_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/PlacePageMetadataText"
android:textAppearance="@style/MwmTextAppearance.PlacePage.Accent"
tools:text="+1 234 567-89-00"/>
tools:text="+1 234 567-89-00" />
</LinearLayout>

View file

@ -4,31 +4,37 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/ll__place_name"
style="@style/PlacePageItemFrame"
android:minHeight="72dp"
tools:background="#2000FF00"
tools:visibility="visible">
<ImageView
android:id="@+id/iv__place_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/PlacePageMetadataIcon"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/margin_base"
android:tint="?iconTint"
android:src="@drawable/ic_address"/>
android:src="@drawable/ic_address" />
<Space
android:id="@+id/anchor_center"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_centerVertical="true" />
<TextView
android:id="@+id/tv__place_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/PlacePageMetadataText"
android:layout_above="@id/anchor_center"
android:layout_toEndOf="@id/iv__place_name"
android:layout_toRightOf="@id/iv__place_name"
android:textAppearance="@style/MwmTextAppearance.PlacePage"
tools:text="Sample place"/>
tools:text="Sample place" />
<TextView
android:id="@+id/tv__place_post_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/tv__place_address"
android:layout_alignStart="@id/tv__place_address"
android:layout_below="@id/tv__place_address"
android:textAppearance="@style/MwmTextAppearance.Body3"
tools:text="Post address"/>
tools:text="Post address" />
</RelativeLayout>

View file

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout style="@style/PlacePagePreview"
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="?ppPreviewHead">
<include layout="@layout/place_page_preview_common"/>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/PlacePagePreview"
android:background="?ppPreviewHead">
<include layout="@layout/place_page_preview_common" />
</LinearLayout>

View file

@ -1,10 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<merge
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:id="@+id/tv__title"
android:layout_width="match_parent"

View file

@ -1,22 +0,0 @@
<?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_schedule"
style="@style/PlacePageItemFrame"
android:tag="schedule"
tools:visibility="visible">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_base"
android:src="@drawable/ic_operating_hours"
android:tint="?iconTint"/>
<TextView
android:id="@+id/tv__place_schedule"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.PlacePage"
tools:text="Today 16:00-18.00"/>
</LinearLayout>

View file

@ -5,20 +5,21 @@
android:id="@+id/ll__place_website"
style="@style/PlacePageItemFrame"
android:tag="website"
tools:visibility="visible"
tools:background="#20FF0000">
tools:background="#20FF0000"
tools:visibility="visible">
<ImageView
android:id="@+id/iv__place_website"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_base"
android:src="@drawable/ic_website"
android:tint="?colorAccent"/>
android:tint="?colorAccent" />
<TextView
android:id="@+id/tv__place_website"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.PlacePage.Accent"
tools:text="osm.org"/>
tools:text="osm.org" />
</LinearLayout>

View file

@ -4,20 +4,16 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/ll__place_wifi"
style="@style/PlacePageItemFrame"
tools:visibility="visible"
tools:background="#40FF0000">
tools:background="#40FF0000"
tools:visibility="visible">
<ImageView
android:id="@+id/iv__place_wifi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_base"
android:src="@drawable/ic_wifi"
android:tint="?iconTint"/>
style="@style/PlacePageMetadataIcon"
android:src="@drawable/ic_wifi" />
<TextView
android:id="@+id/tv__place_wifi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.PlacePage"
android:text="@string/WiFi_available"/>
style="@style/PlacePageMetadataText"
android:text="@string/WiFi_available" />
</LinearLayout>

View file

@ -4,21 +4,18 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/ll__place_wiki"
style="@style/PlacePageItemFrame"
android:tag="website"
tools:visibility="visible"
tools:background="#20FF0000">
android:tag="wiki"
tools:background="#20FF0000"
tools:visibility="visible">
<ImageView
android:id="@+id/iv__place_wiki"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_base"
android:src="@drawable/ic_wiki"
android:tint="?colorAccent"/>
style="@style/PlacePageMetadataIcon"
android:src="@drawable/ic_wiki" />
<TextView
android:id="@+id/tv__place_wiki"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.PlacePage.Accent"
android:text="@string/read_in_wikipedia"/>
style="@style/PlacePageMetadataText"
android:text="@string/read_in_wikipedia"
android:textAppearance="@style/MwmTextAppearance.PlacePage.Accent" />
</LinearLayout>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView
style="@style/MwmWidget.Tab"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
style="@style/MwmWidget.Tab"

View file

@ -25,13 +25,15 @@
<color name="divider_night">#1EFFFFFF</color>
<!-- Backgrounds -->
<color name="bg_window">#FFFFFFFF</color>
<color name="bg_window">#FFF5F5F5</color>
<color name="bg_window_night">#FF32363A</color>
<color name="bg_primary">@color/base_green</color>
<color name="bg_primary_night">#FF1E2226</color>
<color name="bg_panel">#FFF5F5F5</color>
<color name="bg_panel_night">#FF3C4044</color>
<color name="bg_side_panel">#FFFFFFFF</color>
<color name="bg_cards">@android:color/white</color>
<color name="bg_cards_night">#FF3C4044</color>
<color name="bg_panel">@color/bg_window</color>
<color name="bg_panel_night">@color/bg_cards_night</color>
<color name="bg_side_panel">@color/bg_cards</color>
<color name="bg_side_panel_night">@color/bg_panel_night</color>
<color name="bg_dialog_translucent">#BB000000</color>
@ -72,7 +74,6 @@
<color name="routing_start_text_disabled">#42000000</color>
<color name="routing_start_text_disabled_night">#4CFFFFFF</color>
<color name="bs_divider_color">@color/divider</color>
<color name="bs_dark_divider_color">@color/divider_night</color>
@ -84,4 +85,11 @@
<color name="news_marker_active_night">#B3FFFFFF</color>
<color name="news_marker_inactive">#1F000000</color>
<color name="news_marker_inactive_night">#4CFFFFFF</color>
<!-- Editor -->
<color name="bg_editor_add_enabled">@color/base_accent</color>
<color name="bg_editor_add_disabled">#FFF4F4F4</color>
<color name="bg_editor_login_google">#FFF2F6F6</color>
<color name="bg_editor_login_fb">#FF4861A3</color>
</resources>

View file

@ -100,4 +100,8 @@
<dimen name="editor_height_allday">56dp</dimen>
<dimen name="editor_height_hours">80dp</dimen>
<dimen name="editor_height_add_delete_schedule">92dp</dimen>
<dimen name="editor_height_field">64dp</dimen>
<dimen name="editor_margin_left">56dp</dimen>
<dimen name="editor_margin_left_plus">72dp</dimen>
<dimen name="editor_auth_btn_height">36dp</dimen>
</resources>

View file

@ -1,23 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Editor"/>
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="MwmWidget.Editor"/>
<style name="Editor.DayCheckBox">
<style name="MwmWidget.Editor.TimePicker">
<item name="android:headerBackground">@null</item>
<item name="android:headerTimeTextAppearance" tools:targetApi="lollipop">@style/MwmTextAppearance.Editor.TimePicker</item>
<item name="android:headerAmPmTextAppearance" tools:targetApi="lollipop">@style/MwmTextAppearance.Editor.Buttons</item>
<item name="android:timePickerMode" tools:targetApi="lollipop">clock</item>
</style>
<style name="MwmWidget.Editor.CardView">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginBottom">@dimen/margin_base</item>
<item name="android:background">?panel</item>
<item name="android:padding">@dimen/margin_base</item>
</style>
<style name="MwmWidget.Editor.MetadataBlock">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">@dimen/editor_height_field</item>
<item name="android:layout_marginBottom">@dimen/margin_base</item>
</style>
<style name="MwmWidget.Editor.MetadataIcon">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_centerVertical">true</item>
<item name="android:layout_margin">@dimen/margin_half</item>
<item name="android:tint">?iconTint</item>
</style>
<style name="MwmWidget.Editor.DayCheckBox">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:checked">true</item>
</style>
<style name="Editor.DayText">
<style name="MwmWidget.Editor.DayText">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textAppearance">@style/MwmTextAppearance.Body1</item>
</style>
<style name="Editor.DayLayout">
<style name="MwmWidget.Editor.DayLayout">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:gravity">center_horizontal</item>
<item name="android:orientation">vertical</item>
</style>
<style name="MwmWidget.Editor.FieldLayout">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginLeft">@dimen/editor_margin_left</item>
<item name="android:layout_marginStart" tools:targetApi="jelly_bean_mr1">@dimen/editor_margin_left</item>
</style>
<style name="MwmWidget.Editor.FieldLayout.EditText">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:singleLine">true</item>
<item name="android:textAppearance">@style/MwmTextAppearance.Body1</item>
</style>
</resources>

View file

@ -63,4 +63,32 @@
<item name="android:clickable">true</item>
<item name="android:visibility">gone</item>
</style>
<style name="PlacePageMetadata">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:minHeight">@dimen/base_block_size</item>
<item name="android:background">?clickableBackground</item>
<item name="android:orientation">horizontal</item>
<item name="android:gravity">center_vertical</item>
<item name="android:clickable">true</item>
<item name="android:paddingLeft">@dimen/margin_base</item>
<item name="android:paddingStart" tools:targetApi="jelly_bean_mr1">@dimen/margin_base</item>
<item name="android:paddingRight">@dimen/margin_base</item>
<item name="android:paddingEnd" tools:targetApi="jelly_bean_mr1">@dimen/margin_base</item>
</style>
<style name="PlacePageMetadataText">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textAppearance">@style/MwmTextAppearance.PlacePage</item>
</style>
<style name="PlacePageMetadataIcon">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:tint">?iconTint</item>
<item name="android:layout_marginEnd" tools:targetApi="jelly_bean_mr1">@dimen/margin_base</item>
<item name="android:layout_marginRight">@dimen/margin_base</item>
</style>
</resources>

View file

@ -117,6 +117,4 @@
<style name="MwmTextAppearance.Editor.Buttons">
<item name="android:textSize">@dimen/text_size_body_3</item>
</style>
</resources>

View file

@ -138,13 +138,6 @@
<item name="android:indeterminateDrawable">@drawable/rating_bar</item>
</style>
<style name="MwmWidget.Editor.TimePicker" parent="MwmWidget">
<item name="android:headerBackground">@null</item>
<item name="android:headerTimeTextAppearance" tools:targetApi="lollipop">@style/MwmTextAppearance.Editor.TimePicker</item>
<item name="android:headerAmPmTextAppearance" tools:targetApi="lollipop">@style/MwmTextAppearance.Editor.Buttons</item>
<item name="android:timePickerMode" tools:targetApi="lollipop">clock</item>
</style>
<style name="MwmWidget.Counter">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
@ -158,7 +151,6 @@
<item name="android:textColor">@color/text_light</item>
</style>
<style name="MwmWidget.Tab">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">@dimen/tabs_height</item>

View file

@ -5,13 +5,11 @@
<style name="MwmTheme.MainActivity">
<item name="android:colorPrimaryDark" tools:targetApi="lollipop">@android:color/black</item>
<item name="android:timePickerStyle" tools:targetApi="lollipop">@style/MwmWidget.Editor.TimePicker</item>
<item name="android:windowBackground">@null</item>
</style>
<style name="MwmTheme.Night.MainActivity">
<item name="android:colorPrimaryDark" tools:targetApi="lollipop">@android:color/black</item>
<item name="android:windowBackground">@null</item>
</style>
<style name="MwmTheme.Night.MainActivity" parent="MwmTheme.MainActivity"/>
<style name="MwmTheme.Settings"/>
@ -59,6 +57,8 @@
<item name="android:timePickerStyle" tools:targetApi="lollipop">@style/MwmWidget.Editor.TimePicker</item>
</style>
<style name="MwmTheme.Night.EditorActivity" parent="MwmTheme.EditorActivity"/>
<style name="MwmTheme.DialogFragment.TitleStyle" parent="Base.DialogWindowTitle.AppCompat">
<item name="android:textAppearance">@style/MwmTextAppearance.Title</item>
<item name="android:fontFamily" tools:targetApi="jelly_bean">@string/robotoMedium</item>

View file

@ -15,7 +15,6 @@ import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.AlertDialog;
import android.text.TextUtils;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
@ -43,9 +42,8 @@ import com.mapswithme.maps.bookmarks.ChooseBookmarkCategoryFragment;
import com.mapswithme.maps.bookmarks.data.BookmarkManager;
import com.mapswithme.maps.bookmarks.data.MapObject;
import com.mapswithme.maps.bookmarks.data.MapObject.ApiPoint;
import com.mapswithme.maps.bookmarks.data.Metadata;
import com.mapswithme.maps.editor.EditorActivity;
import com.mapswithme.maps.editor.EditorFragment;
import com.mapswithme.maps.editor.EditorHostFragment;
import com.mapswithme.maps.location.LocationHelper;
import com.mapswithme.maps.location.LocationPredictor;
import com.mapswithme.maps.routing.NavigationController;
@ -66,7 +64,6 @@ import com.mapswithme.maps.widget.menu.MainMenu;
import com.mapswithme.maps.widget.placepage.BasePlacePageAnimationController;
import com.mapswithme.maps.widget.placepage.PlacePageView;
import com.mapswithme.maps.widget.placepage.PlacePageView.State;
import com.mapswithme.maps.widget.placepage.TimetableFragment;
import com.mapswithme.util.Animations;
import com.mapswithme.util.BottomSheetHelper;
import com.mapswithme.util.Config;
@ -102,7 +99,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
private static final String[] DOCKED_FRAGMENTS = { SearchFragment.class.getName(),
DownloadFragment.class.getName(),
RoutingPlanFragment.class.getName(),
TimetableFragment.class.getName() };
EditorHostFragment.class.getName() };
// Instance state
private static final String STATE_PP_OPENED = "PpOpened";
private static final String STATE_MAP_OBJECT = "MapObject";
@ -255,14 +252,11 @@ public class MwmActivity extends BaseMwmFragmentActivity
public void showEditor(MapObject point)
{
final String openingTime = point.getMetadata(Metadata.MetadataType.FMD_OPEN_HOURS);
// TODO use EditorFragment after is will be finished
if (mIsFragmentContainer)
{
final Bundle args = new Bundle();
if (!TextUtils.isEmpty(openingTime))
args.putString(TimetableFragment.EXTRA_TIME, openingTime);
replaceFragment(TimetableFragment.class, args, null);
args.putParcelable(EditorHostFragment.EXTRA_MAP_OBJECT, point);
replaceFragment(EditorHostFragment.class, args, null);
}
else
EditorActivity.start(this, point);

View file

@ -2,12 +2,11 @@ package com.mapswithme.maps.editor;
import android.app.Activity;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.text.TextUtils;
import com.mapswithme.maps.base.BaseMwmFragmentActivity;
import com.mapswithme.maps.bookmarks.data.MapObject;
import com.mapswithme.maps.bookmarks.data.Metadata;
import com.mapswithme.maps.widget.placepage.TimetableFragment;
public class EditorActivity extends BaseMwmFragmentActivity
@ -15,8 +14,7 @@ public class EditorActivity extends BaseMwmFragmentActivity
@Override
protected Class<? extends Fragment> getFragmentClass()
{
// TODO use EditorFragment after is will be finished
return TimetableFragment.class;
return EditorHostFragment.class;
}
@Override
@ -27,13 +25,10 @@ public class EditorActivity extends BaseMwmFragmentActivity
super.onBackPressed();
}
public static void start(Activity activity, MapObject point)
public static void start(@NonNull Activity activity, @NonNull MapObject point)
{
final Intent intent = new Intent(activity, EditorActivity.class);
final String openHours = point.getMetadata(Metadata.MetadataType.FMD_OPEN_HOURS);
if (!TextUtils.isEmpty(openHours))
intent.putExtra(TimetableFragment.EXTRA_TIME, openHours);
intent.putExtra(EditorHostFragment.EXTRA_MAP_OBJECT, point);
activity.startActivity(intent);
}
}

View file

@ -1,16 +1,121 @@
package com.mapswithme.maps.editor;
import com.mapswithme.maps.base.BaseMwmFragment;
import com.mapswithme.maps.base.OnBackPressListener;
import android.os.Bundle;
import android.support.annotation.IdRes;
import android.support.annotation.Nullable;
import android.support.v7.widget.SwitchCompat;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.TextView;
public class EditorFragment extends BaseMwmFragment
implements OnBackPressListener
import com.mapswithme.maps.R;
import com.mapswithme.maps.base.BaseMwmFragment;
import com.mapswithme.maps.bookmarks.data.MapObject;
import com.mapswithme.maps.bookmarks.data.Metadata;
import com.mapswithme.util.UiUtils;
public class EditorFragment extends BaseMwmFragment implements View.OnClickListener
{
public static final String EXTRA_POINT = "point";
private MapObject mEditedPoi;
private EditText mEtName;
private TextView mTvLocalizedNames;
private TextView mTvAddress;
private TextView mTvOpeningHours;
private EditText mEtBuilding;
private EditText mEtPhone;
private EditText mEtWebsite;
private EditText mEtEmail;
private TextView mTvCuisine;
private SwitchCompat mSwWifi;
private TextView mEmptyOpeningHours;
private TextView mTvSchedule;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState)
{
return inflater.inflate(R.layout.fragment_editor, container, false);
}
@Override
public boolean onBackPressed()
public void onViewCreated(View view, @Nullable Bundle savedInstanceState)
{
return false;
super.onViewCreated(view, savedInstanceState);
initViews(view);
mEditedPoi = getArguments().getParcelable(EditorHostFragment.EXTRA_MAP_OBJECT);
if (mEditedPoi == null)
throw new IllegalStateException("Valid MapObject should be passed to edit it.");
mEtName.setText(mEditedPoi.getName());
// mTvLocalizedNames.setText();
// mTvAddress.setText();
mEtPhone.setText(mEditedPoi.getMetadata(Metadata.MetadataType.FMD_PHONE_NUMBER));
mEtWebsite.setText(mEditedPoi.getMetadata(Metadata.MetadataType.FMD_WEBSITE));
mEtEmail.setText(mEditedPoi.getMetadata(Metadata.MetadataType.FMD_EMAIL));
mTvCuisine.setText(mEditedPoi.getMetadata(Metadata.MetadataType.FMD_CUISINE));
mSwWifi.setChecked(!TextUtils.isEmpty(mEditedPoi.getMetadata(Metadata.MetadataType.FMD_INTERNET)));
refreshOpeningTime();
}
private void refreshOpeningTime()
{
final String openingTime = mEditedPoi.getMetadata(Metadata.MetadataType.FMD_OPEN_HOURS);
if (TextUtils.isEmpty(openingTime))
{
UiUtils.show(mEmptyOpeningHours);
UiUtils.hide(mTvSchedule);
}
else
{
UiUtils.hide(mEmptyOpeningHours);
UiUtils.setTextAndShow(mTvSchedule, formatOpeningHours(openingTime));
}
}
private String formatOpeningHours(String openingTime)
{
// TODO
return openingTime;
}
private void initViews(View view)
{
mEtName = findInput(view, R.id.name);
mEtBuilding = findInput(view, R.id.building);
mEtPhone = findInput(view, R.id.phone);
mEtWebsite = findInput(view, R.id.website);
mEtEmail = findInput(view, R.id.email);
mTvCuisine = (TextView) view.findViewById(R.id.tv__cuisine);
mSwWifi = (SwitchCompat) view.findViewById(R.id.sw__wifi);
view.findViewById(R.id.tv__edit_oh).setOnClickListener(this);
mEmptyOpeningHours = (TextView) view.findViewById(R.id.et__empty_schedule);
mTvSchedule = (TextView) view.findViewById(R.id.tv__place_schedule);
UiUtils.hide(view.findViewById(R.id.tv__today_schedule));
}
private EditText findInput(View view, @IdRes int name)
{
return (EditText) view.findViewById(name).findViewById(R.id.input);
}
@Override
public void onClick(View v)
{
switch (v.getId())
{
case R.id.tv__edit_oh:
editOpeningHours();
break;
}
}
private void editOpeningHours()
{
}
}

View file

@ -0,0 +1,44 @@
package com.mapswithme.maps.editor;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.mapswithme.maps.R;
import com.mapswithme.maps.base.BaseMwmToolbarFragment;
import com.mapswithme.maps.base.OnBackPressListener;
public class EditorHostFragment extends BaseMwmToolbarFragment
implements OnBackPressListener
{
public static final String EXTRA_MAP_OBJECT = "MapObject";
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState)
{
return inflater.inflate(R.layout.fragment_editor_host, container, false);
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState)
{
super.onViewCreated(view, savedInstanceState);
final Fragment editorFragment = Fragment.instantiate(getActivity(), EditorFragment.class.getName(), getArguments());
getChildFragmentManager().beginTransaction()
.replace(R.id.fragment_container, editorFragment)
.commit();
mToolbarController.setTitle("Edit POI");
}
@Override
public boolean onBackPressed()
{
return false;
}
}

View file

@ -90,23 +90,23 @@ public class PlacePageView extends RelativeLayout implements View.OnClickListene
private TextView mTvElevation;
// Place page details
private ScrollView mPpDetails;
private LinearLayout mPhone;
private View mPhone;
private TextView mTvPhone;
private LinearLayout mWebsite;
private View mWebsite;
private TextView mTvWebsite;
private TextView mTvLatlon;
private LinearLayout mSchedule;
private View mSchedule;
private TextView mTvSchedule;
private LinearLayout mWifi;
private LinearLayout mEmail;
private View mWifi;
private View mEmail;
private TextView mTvEmail;
private LinearLayout mOperator;
private View mOperator;
private TextView mTvOperator;
private LinearLayout mCuisine;
private View mCuisine;
private TextView mTvCuisine;
private LinearLayout mWiki;
private View mWiki;
private TextView mTvWiki;
private LinearLayout mEntrance;
private View mEntrance;
private TextView mTvEntrance;
private View mEditor;
private TextView mTvEditor;
@ -178,31 +178,31 @@ public class PlacePageView extends RelativeLayout implements View.OnClickListene
mPpDetails = (ScrollView) findViewById(R.id.pp__details);
RelativeLayout address = (RelativeLayout)mPpDetails.findViewById(R.id.ll__place_name);
mPhone = (LinearLayout) mPpDetails.findViewById(R.id.ll__place_phone);
mPhone = mPpDetails.findViewById(R.id.ll__place_phone);
mPhone.setOnClickListener(this);
mTvPhone = (TextView) mPpDetails.findViewById(R.id.tv__place_phone);
mWebsite = (LinearLayout) mPpDetails.findViewById(R.id.ll__place_website);
mWebsite = mPpDetails.findViewById(R.id.ll__place_website);
mWebsite.setOnClickListener(this);
mTvWebsite = (TextView) mPpDetails.findViewById(R.id.tv__place_website);
LinearLayout latlon = (LinearLayout)mPpDetails.findViewById(R.id.ll__place_latlon);
latlon.setOnClickListener(this);
mTvLatlon = (TextView) mPpDetails.findViewById(R.id.tv__place_latlon);
mSchedule = (LinearLayout) mPpDetails.findViewById(R.id.ll__place_schedule);
mSchedule = mPpDetails.findViewById(R.id.ll__place_schedule);
mTvSchedule = (TextView) mPpDetails.findViewById(R.id.tv__place_schedule);
mWifi = (LinearLayout) mPpDetails.findViewById(R.id.ll__place_wifi);
mWifi = mPpDetails.findViewById(R.id.ll__place_wifi);
mIvColor = (ImageView) mPpDetails.findViewById(R.id.iv__bookmark_color);
mIvColor.setOnClickListener(this);
mEmail = (LinearLayout) mPpDetails.findViewById(R.id.ll__place_email);
mEmail = mPpDetails.findViewById(R.id.ll__place_email);
mEmail.setOnClickListener(this);
mTvEmail = (TextView) mEmail.findViewById(R.id.tv__place_email);
mOperator = (LinearLayout) mPpDetails.findViewById(R.id.ll__place_operator);
mOperator = mPpDetails.findViewById(R.id.ll__place_operator);
mOperator.setOnClickListener(this);
mTvOperator = (TextView) mOperator.findViewById(R.id.tv__place_operator);
mCuisine = (LinearLayout) mPpDetails.findViewById(R.id.ll__place_cuisine);
mCuisine = mPpDetails.findViewById(R.id.ll__place_cuisine);
mTvCuisine = (TextView) mCuisine.findViewById(R.id.tv__place_cuisine);
mWiki = (LinearLayout) mPpDetails.findViewById(R.id.ll__place_wiki);
mWiki = mPpDetails.findViewById(R.id.ll__place_wiki);
mWiki.setOnClickListener(this);
mEntrance = (LinearLayout) mPpDetails.findViewById(R.id.ll__place_entrance);
mEntrance = mPpDetails.findViewById(R.id.ll__place_entrance);
mTvEntrance = (TextView) mEntrance.findViewById(R.id.tv__place_entrance);
mEditor = mPpDetails.findViewById(R.id.ll__place_editor);
mTvEditor = (TextView) mEditor.findViewById(R.id.tv__editor);
@ -572,7 +572,7 @@ public class PlacePageView extends RelativeLayout implements View.OnClickListene
mTvLatlon.setText(latLon[0] + ", " + latLon[1]);
}
private static void refreshMetadataOrHide(String metadata, LinearLayout metaLayout, TextView metaTv)
private static void refreshMetadataOrHide(String metadata, View metaLayout, TextView metaTv)
{
if (!TextUtils.isEmpty(metadata))
{
@ -729,7 +729,6 @@ public class PlacePageView extends RelativeLayout implements View.OnClickListene
case R.id.ll__place_editor:
showEditor();
break;
case R.id.iv__bookmark_color:
saveBookmarkNameIfUpdated();
selectBookmarkColor();