Merge pull request #4246 from yunikkk/search-navigation-android

[android] Search in navigation.
This commit is contained in:
ygorshenin 2016-09-14 15:52:37 +03:00 committed by GitHub
commit 0814228822
113 changed files with 629 additions and 75 deletions

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="@integer/anim_fade_main"
android:interpolator="@android:anim/decelerate_interpolator">
<objectAnimator
android:duration="@integer/anim_menu"
android:propertyName="scaleX"
android:valueFrom="0.3"
android:valueTo="1.0"/>
<objectAnimator
android:duration="@integer/anim_menu"
android:propertyName="scaleY"
android:valueFrom="0.3"
android:valueTo="1.0"/>
<objectAnimator
android:duration="@integer/anim_menu"
android:propertyName="alpha"
android:valueFrom="0.3"
android:valueTo="1.0"/>
</set>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="@integer/anim_fade_main"
android:interpolator="@android:anim/decelerate_interpolator">
<objectAnimator
android:duration="@integer/anim_menu"
android:propertyName="scaleX"
android:valueFrom="1.0"
android:valueTo="0.3"/>
<objectAnimator
android:duration="@integer/anim_menu"
android:propertyName="scaleY"
android:valueFrom="1.0"
android:valueTo="0.3"/>
<objectAnimator
android:duration="@integer/anim_menu"
android:propertyName="alpha"
android:valueFrom="1.0"
android:valueTo="0.3"/>
</set>

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/bg_panel"/>
<corners android:radius="100dp"/>
</shape>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/bg_panel_night"/>
<corners android:radius="100dp"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 952 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View file

@ -0,0 +1,6 @@
<?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_panel"/>
</shape>

View file

@ -0,0 +1,6 @@
<?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_panel_night"/>
</shape>

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="UnusedAttribute">
<item android:drawable="@drawable/ic_zoom_out_pressed"
android:state_pressed="true"/>
<item android:drawable="@drawable/ic_zoom_out"/>
</selector>

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="UnusedAttribute">
<item android:drawable="@drawable/ic_zoom_out_pressed_night"
android:state_pressed="true"/>
<item android:drawable="@drawable/ic_zoom_out_night"/>
</selector>

View file

@ -0,0 +1,71 @@
<?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="match_parent"
android:theme="?navButtonsTheme"
android:layout_marginBottom="@dimen/nav_menu_height"
tools:background="@color/bg_primary"
tools:showIn="@layout/layout_nav">
<View
android:id="@+id/touch_interceptor"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"/>
<LinearLayout
android:id="@+id/search_frame"
android:layout_width="286dp"
android:layout_height="56dp"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/margin_half_plus"
android:background="?searchLayoutBackground"
android:orientation="horizontal"
android:padding="@dimen/margin_quarter"
android:visibility="invisible"
tools:visibility="visible">
<ImageView
android:id="@+id/search_fuel"
style="@style/MwmWidget.SearchNavigationButton"
android:layout_marginLeft="60dp"
android:layout_marginStart="60dp"
android:src="@drawable/ic_routing_fuel_on"/>
<ImageView
android:id="@+id/search_parking"
style="@style/MwmWidget.SearchNavigationButton"
android:src="@drawable/ic_routing_parking_on"/>
<ImageView
android:id="@+id/search_food"
style="@style/MwmWidget.SearchNavigationButton"
android:src="@drawable/ic_routing_food_on"/>
<ImageView
android:id="@+id/search_shop"
style="@style/MwmWidget.SearchNavigationButton"
android:src="@drawable/ic_routing_shop_on"/>
<ImageView
android:id="@+id/search_atm"
style="@style/MwmWidget.SearchNavigationButton"
android:src="@drawable/ic_routing_atm_on"/>
</LinearLayout>
<ImageButton
android:id="@+id/btn_search"
style="@style/MwmWidget.SearchNavigationButton"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginBottom="@dimen/margin_half"
android:background="?nav_background"
android:src="@drawable/ic_menu_search"
android:tint="@null"/>
</RelativeLayout>

View file

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/nav_menu_height"
android:padding="@dimen/nav_frame_padding"
android:theme="?navButtonsTheme">
<ImageButton
android:id="@+id/nav_zoom_out"
style="@style/MwmWidget.MapButton"
android:layout_above="@+id/nav_zoom_in"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:background="?nav_background"
android:src="@drawable/ic_zoom_out"/>
<ImageButton
android:id="@+id/nav_zoom_in"
style="@style/MwmWidget.MapButton"
android:layout_above="@+id/my_position"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:background="?nav_background"
android:src="@drawable/ic_zoom_in"/>
<ImageButton
android:id="@+id/my_position"
style="@style/MwmWidget.MapButton"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="@dimen/margin_base_plus"
android:background="?nav_background"
android:contentDescription="@string/my_position"
android:tint="@null"/>
</RelativeLayout>

View file

@ -35,6 +35,7 @@
android:layout_height="wrap_content"
android:layout_alignWithParentIfMissing="true"
android:layout_toRightOf="@+id/fragment_container"
android:layout_toEndOf="@id/fragment_container"
android:clipToPadding="false"
android:orientation="vertical"
android:padding="@dimen/margin_base">
@ -48,13 +49,6 @@
android:visibility="gone"
tools:visibility="visible"/>
<include
layout="@layout/layout_nav"
android:layout_width="@dimen/panel_width"
android:layout_height="match_parent"
android:visibility="invisible"
tools:visibility="visible"/>
<com.mapswithme.maps.widget.placepage.PlacePageView
android:id="@+id/info_box"
style="@style/MwmWidget.Floating"
@ -66,6 +60,13 @@
placePage:floating="true"/>
</LinearLayout>
<include
layout="@layout/layout_nav"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="invisible"
tools:visibility="visible"/>
<include
android:id="@+id/menu_frame"
layout="@layout/menu"

View file

@ -1,9 +1,15 @@
<?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:id="@+id/navigation_frame"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
tools:showIn="@layout/activity_map">
<include layout="@layout/layout_nav_top"/>
<include layout="@layout/layout_nav_search"/>
<include layout="@layout/layout_nav_bottom"/>
</FrameLayout>

View file

@ -11,7 +11,8 @@
android:clickable="true"
android:visibility="invisible"
android:background="?menuBackgroundOpen"
tools:visibility="visible">
tools:visibility="visible"
tools:showIn="@layout/layout_nav">
<FrameLayout
android:id="@+id/line_frame"
@ -80,7 +81,7 @@
android:layout_width="@dimen/nav_icon_size"
android:layout_height="@dimen/nav_icon_size"
android:scaleType="center"
android:layout_gravity="center_vertical|right"
android:layout_gravity="center_vertical|end"
android:src="@drawable/ic_voice_on"
android:background="?selectableItemBackgroundBorderless"/>
</FrameLayout>

View file

@ -0,0 +1,90 @@
<?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="match_parent"
android:theme="?navButtonsTheme"
tools:background="@color/bg_primary"
tools:showIn="@layout/layout_nav">
<Space
android:id="@id/anchor_center"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_centerInParent="true"/>
<View
android:id="@+id/touch_interceptor"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"/>
<RelativeLayout
android:id="@+id/search_frame"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="-68dp"
android:layout_below="@id/anchor_center"
android:layout_marginLeft="-70dp"
android:layout_marginStart="-70dp"
android:background="?searchLayoutBackground"
android:visibility="invisible"
tools:visibility="visible">
<ImageView
android:id="@+id/search_fuel"
style="@style/MwmWidget.SearchNavigationButton"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:src="@drawable/ic_routing_fuel_on"/>
<ImageView
android:id="@+id/search_parking"
style="@style/MwmWidget.SearchNavigationButton"
android:layout_marginTop="30dp"
android:layout_toEndOf="@id/search_fuel"
android:layout_toRightOf="@id/search_fuel"
android:src="@drawable/ic_routing_parking_on"/>
<ImageView
android:id="@+id/search_food"
style="@style/MwmWidget.SearchNavigationButton"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_routing_food_on"/>
<ImageView
android:id="@+id/search_shop"
style="@style/MwmWidget.SearchNavigationButton"
android:layout_alignParentBottom="true"
android:layout_marginBottom="30dp"
android:layout_toEndOf="@id/search_fuel"
android:layout_toRightOf="@id/search_fuel"
android:src="@drawable/ic_routing_shop_on"/>
<ImageView
android:id="@+id/search_atm"
style="@style/MwmWidget.SearchNavigationButton"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:src="@drawable/ic_routing_atm_on"/>
</RelativeLayout>
<ImageButton
android:id="@+id/btn_search"
style="@style/MwmWidget.SearchNavigationButton"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_below="@id/anchor_center"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:background="?nav_background"
android:src="@drawable/ic_menu_search"
android:tint="@null"/>
</RelativeLayout>

View file

@ -5,7 +5,8 @@
android:id="@+id/nav_top_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:background="#20FF0000">
tools:background="#20FF0000"
tools:showIn="@layout/layout_nav">
<FrameLayout
android:id="@+id/street_frame"
android:layout_width="match_parent"

Some files were not shown because too many files have changed in this diff Show more