Proper animations for 7-inch tablets in portrait.

This commit is contained in:
Dmitry Yunitsky 2015-02-20 15:35:54 +03:00 committed by Alex Zolotarev
parent 0bd8679b73
commit ad38b44fa7
11 changed files with 1292 additions and 59 deletions

View file

@ -24,8 +24,7 @@
android:layout_height="wrap_content"
android:layout_below="@id/pp__preview"
android:layout_marginBottom="56dp"
android:layout_marginTop="1px"
android:visibility="visible"/>
android:layout_marginTop="1px"/>
<View
android:layout_width="match_parent"

View file

@ -0,0 +1,297 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="vertical">
<LinearLayout
android:id="@+id/rl__place_details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/margin_medium_and_half">
<LinearLayout
android:id="@+id/ll__place_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv__place_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_adress"/>
<TextView
android:id="@+id/tv__place_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/iv__place_name"
android:text="Some address"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll__place_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_small"
android:background="?attr/clickableBackground"
android:orientation="horizontal"
android:paddingBottom="@dimen/margin_small"
android:paddingTop="@dimen/margin_small">
<ImageView
android:id="@+id/iv__place_phone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_phone"/>
<TextView
android:id="@+id/tv__place_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="9119992"
android:textColor="@color/text_place_page_blue"
android:textSize="@dimen/place_page_subtitle"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll__place_website"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/clickableBackground"
android:orientation="horizontal"
android:paddingBottom="@dimen/margin_small"
android:paddingTop="@dimen/margin_small">
<ImageView
android:id="@+id/iv__place_website"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_link"/>
<TextView
android:id="@+id/tv__place_website"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="www.test.com"
android:textColor="@color/text_place_page_blue"
android:textSize="@dimen/place_page_subtitle"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll__place_schedule"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/clickableBackground"
android:orientation="horizontal"
android:paddingBottom="@dimen/margin_small"
android:paddingTop="@dimen/margin_small">
<ImageView
android:id="@+id/iv__place_schedule"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_worktime"/>
<TextView
android:id="@+id/tv__place_schedule"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Пн-Пт 10:00-23:00"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll__place_latlon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/clickableBackground"
android:orientation="horizontal"
android:paddingBottom="@dimen/margin_small"
android:paddingTop="@dimen/margin_small">
<ImageView
android:id="@+id/iv__place_latlon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_position"/>
<TextView
android:id="@+id/tv__place_latlon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="31.21345, 2.234 235"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll__place_wifi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_medium"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv__place_wifi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_wifi"/>
<TextView
android:id="@+id/tv__place_wifi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Yes"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginTop="@dimen/margin_medium_and_half"
android:background="?attr/dividerHorizontal"/>
<RelativeLayout
android:id="@+id/rl__bookmark_details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_medium_and_half">
<ImageView
android:id="@+id/iv__bookmark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_bookmark"/>
<TextView
android:id="@+id/tv__bookmark_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignTop="@id/iv__bookmark"
android:layout_toRightOf="@id/iv__bookmark"
android:lineSpacingMultiplier="1.67"
android:text="Name"
android:textColor="@color/text_place_page_subtitle"
android:textSize="@dimen/place_page_sub_subtitle"/>
<EditText
android:id="@+id/et__bookmark_name"
style="@style/PlaceEditableParam"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv__bookmark_title"
android:layout_marginTop="@dimen/margin_tiny"
android:layout_toRightOf="@id/iv__bookmark"
android:hint="@string/name"
android:inputType="textCapWords"
android:lineSpacingMultiplier="1.43"
android:singleLine="true"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_below="@id/et__bookmark_name"
android:layout_marginTop="@dimen/margin_small"
android:background="?attr/dividerHorizontal"/>
<TextView
android:id="@+id/tv__bookmark_group_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/et__bookmark_name"
android:layout_marginTop="@dimen/margin_medium_and_half"
android:layout_toRightOf="@id/iv__bookmark"
android:lineSpacingMultiplier="1.67"
android:text="Group"
android:textColor="@color/text_place_page_subtitle"
android:textSize="@dimen/place_page_sub_subtitle"/>
<LinearLayout
android:id="@+id/ll__group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv__bookmark_group_title"
android:layout_marginTop="@dimen/margin_tiny"
android:layout_toRightOf="@id/iv__bookmark"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/tv__bookmark_group"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawableRight="@drawable/ic_arrow_down"
android:lineSpacingMultiplier="1.43"
android:paddingRight="@dimen/margin_small"
android:text="Great group"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
<ImageView
android:id="@+id/iv__bookmark_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/margin_medium"
android:src="@drawable/color_picker_red_on"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_below="@id/ll__group"
android:layout_marginTop="@dimen/margin_small"
android:background="?android:attr/listDivider"/>
<TextView
android:id="@+id/tv__bookmark_notes_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/ll__group"
android:layout_marginTop="@dimen/margin_medium"
android:layout_toRightOf="@id/iv__bookmark"
android:lineSpacingMultiplier="1.67"
android:text="Notes"
android:textColor="@color/text_place_page_subtitle"
android:textSize="@dimen/place_page_sub_subtitle"/>
<EditText
android:id="@+id/et__bookmark_notes"
style="@style/PlaceEditableParam"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv__bookmark_notes_title"
android:layout_marginTop="@dimen/margin_tiny"
android:layout_toRightOf="@id/iv__bookmark"
android:background="@null"
android:hint="Notes"
android:inputType="text"
android:lineSpacingMultiplier="1.43"
android:singleLine="true"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
</RelativeLayout>
</LinearLayout>
</ScrollView>

View file

@ -0,0 +1,136 @@
<?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:gravity="bottom">
<android.view.SurfaceView
android:id="@+id/map_surfaceview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="bottom|center_horizontal"
android:background="@android:color/transparent"/>
<com.mapswithme.maps.widget.placepage.PlacePageView
android:id="@+id/info_box"
android:layout_width="@dimen/panel_width"
android:layout_height="wrap_content"
android:layout_below="@+id/toolbar_search"
android:layout_margin="@dimen/margin_medium"/>
<RelativeLayout
android:id="@+id/rl__routing_box"
style="@style/MwmLightShadow"
android:layout_width="@dimen/panel_width"
android:layout_height="@dimen/routing_pp_height"
android:layout_below="@+id/toolbar_search"
android:layout_margin="@dimen/margin_medium"
android:background="@drawable/ic_bg_pp">
<RelativeLayout
android:id="@+id/rl__routing_go"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_toLeftOf="@+id/iv__routing_close">
<TextView
android:id="@+id/tv__routing_go"
android:layout_width="wrap_content"
android:layout_height="@dimen/routing_button_height"
android:layout_centerVertical="true"
android:background="?attr/clickableBackground"
android:gravity="bottom"
android:includeFontPadding="false"
android:paddingBottom="10dp"
android:paddingLeft="18dp"
android:paddingRight="18dp"
android:text="@string/routing_go"
android:textColor="@color/downloader_green"
android:textSize="18sp"/>
<View
android:layout_width="20dp"
android:layout_height="2dp"
android:layout_alignLeft="@id/tv__routing_go"
android:layout_alignParentBottom="true"
android:layout_alignRight="@id/tv__routing_go"
android:background="@color/downloader_green"/>
</RelativeLayout>
<ImageView
android:id="@+id/iv__routing_close"
android:layout_width="@dimen/routing_button_width"
android:layout_height="@dimen/routing_button_height"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="?attr/clickableBackground"
android:padding="@dimen/margin_medium"
android:scaleType="center"
android:src="@drawable/ic_close_routing"/>
<TextView
android:id="@+id/tv__routing_distance"
style="@style/TextAppearance.AppCompat.Large"
android:layout_width="wrap_content"
android:layout_height="@dimen/routing_button_height"
android:layout_centerVertical="true"
android:gravity="bottom"
android:includeFontPadding="false"
android:paddingBottom="1dp"
android:paddingLeft="10dp"
android:paddingRight="9dp"/>
</RelativeLayout>
<include
android:id="@+id/layout__turn_instructions"
layout="@layout/map_turn_instructions"
android:layout_width="@dimen/panel_width"
android:layout_height="@dimen/routing_pp_height"
android:layout_below="@+id/toolbar_search"
android:layout_margin="@dimen/margin_medium"
android:visibility="gone"/>
<include
android:id="@+id/navigation_buttons_container_ref"
layout="@layout/map_navigation_buttons"
android:layout_width="wrap_content"
android:layout_height="match_parent"/>
<ImageView
android:id="@+id/fade_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@android:color/black"
android:visibility="gone"/>
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="@dimen/panel_width"
android:layout_height="match_parent"
android:layout_margin="@dimen/margin_medium"/>
<include
android:id="@+id/toolbar_search"
layout="@layout/toolbar_with_search"
android:layout_width="@dimen/panel_width"
android:layout_height="?attr/actionBarSize"
android:layout_margin="@dimen/margin_medium"/>
<include
android:id="@+id/map_bottom_toolbar"
layout="@layout/map_bottom_toolbar"
android:layout_width="@dimen/bottom_panel_width"
android:layout_height="280dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"/>
<include
android:id="@+id/map_bottom_vertical_toolbar"
layout="@layout/map_bottom_vertical_toolbar"
android:layout_width="@dimen/panel_width"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_medium"/>
</RelativeLayout>

View file

@ -0,0 +1,329 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/rl__place_details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/margin_medium_and_half">
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="?android:attr/listDivider"/>
<View
android:id="@+id/anchor_center"
android:layout_width="1px"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/margin_medium"
android:layout_marginRight="@dimen/margin_medium"/>
<LinearLayout
android:id="@+id/ll__details_left"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/anchor_center"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll__place_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="@dimen/margin_small">
<ImageView
android:id="@+id/iv__place_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_adress"/>
<TextView
android:id="@+id/tv__place_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/iv__place_name"
android:text="Some address"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll__place_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_small"
android:background="?attr/clickableBackground"
android:orientation="horizontal"
android:paddingBottom="@dimen/margin_small"
android:paddingTop="@dimen/margin_small">
<ImageView
android:id="@+id/iv__place_phone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_phone"/>
<TextView
android:id="@+id/tv__place_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="9119992"
android:textColor="@color/text_place_page_blue"
android:textSize="@dimen/place_page_subtitle"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll__place_website"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/clickableBackground"
android:orientation="horizontal"
android:paddingBottom="@dimen/margin_small"
android:paddingTop="@dimen/margin_small">
<ImageView
android:id="@+id/iv__place_website"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_link"/>
<TextView
android:id="@+id/tv__place_website"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="www.test.com"
android:textColor="@color/text_place_page_blue"
android:textSize="@dimen/place_page_subtitle"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll__place_schedule"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/clickableBackground"
android:orientation="horizontal"
android:paddingBottom="@dimen/margin_small"
android:paddingTop="@dimen/margin_small">
<ImageView
android:id="@+id/iv__place_schedule"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_worktime"/>
<TextView
android:id="@+id/tv__place_schedule"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Пн-Пт 10:00-23:00"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll__details_right"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/anchor_center"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll__place_latlon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/clickableBackground"
android:orientation="horizontal"
android:paddingBottom="@dimen/margin_small"
android:paddingTop="@dimen/margin_small">
<ImageView
android:id="@+id/iv__place_latlon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_position"/>
<TextView
android:id="@+id/tv__place_latlon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="31.21345, 2.234 235"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll__place_wifi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_medium"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv__place_wifi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_wifi"/>
<TextView
android:id="@+id/tv__place_wifi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Yes"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:id="@+id/rl__bookmark_details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/ll__details_left"
android:layout_marginTop="@dimen/margin_medium_and_half">
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="?attr/dividerHorizontal"/>
<ImageView
android:id="@+id/iv__bookmark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:layout_marginTop="@dimen/margin_medium_and_half"
android:src="@drawable/ic_text_bookmark"/>
<TextView
android:id="@+id/tv__bookmark_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignTop="@id/iv__bookmark"
android:layout_toRightOf="@id/iv__bookmark"
android:lineSpacingMultiplier="1.67"
android:text="Name"
android:textColor="@color/text_place_page_subtitle"
android:textSize="@dimen/place_page_sub_subtitle"/>
<EditText
android:id="@+id/et__bookmark_name"
style="@style/PlaceEditableParam"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv__bookmark_title"
android:layout_marginTop="@dimen/margin_tiny"
android:layout_toRightOf="@id/iv__bookmark"
android:hint="@string/name"
android:inputType="textCapWords"
android:lineSpacingMultiplier="1.43"
android:singleLine="true"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_below="@id/et__bookmark_name"
android:layout_marginTop="@dimen/margin_small"
android:background="?attr/dividerHorizontal"/>
<TextView
android:id="@+id/tv__bookmark_group_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/et__bookmark_name"
android:layout_marginTop="@dimen/margin_medium_and_half"
android:layout_toRightOf="@id/iv__bookmark"
android:lineSpacingMultiplier="1.67"
android:text="Group"
android:textColor="@color/text_place_page_subtitle"
android:textSize="@dimen/place_page_sub_subtitle"/>
<LinearLayout
android:id="@+id/ll__group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv__bookmark_group_title"
android:layout_marginTop="@dimen/margin_tiny"
android:layout_toRightOf="@id/iv__bookmark"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/tv__bookmark_group"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawableRight="@drawable/ic_arrow_down"
android:lineSpacingMultiplier="1.43"
android:paddingRight="@dimen/margin_small"
android:text="Great group"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
<ImageView
android:id="@+id/iv__bookmark_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/margin_medium"
android:src="@drawable/color_picker_red_on"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_below="@id/ll__group"
android:layout_marginTop="@dimen/margin_small"
android:background="?android:attr/listDivider"/>
<TextView
android:id="@+id/tv__bookmark_notes_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/ll__group"
android:layout_marginTop="@dimen/margin_medium"
android:layout_toRightOf="@id/iv__bookmark"
android:lineSpacingMultiplier="1.67"
android:text="Notes"
android:textColor="@color/text_place_page_subtitle"
android:textSize="@dimen/place_page_sub_subtitle"/>
<EditText
android:id="@+id/et__bookmark_notes"
style="@style/PlaceEditableParam"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv__bookmark_notes_title"
android:layout_marginTop="@dimen/margin_tiny"
android:layout_toRightOf="@id/iv__bookmark"
android:background="@null"
android:hint="Notes"
android:inputType="text"
android:lineSpacingMultiplier="1.43"
android:singleLine="true"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
</RelativeLayout>
</RelativeLayout>
</ScrollView>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:placePage="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom">
@ -13,10 +14,10 @@
<com.mapswithme.maps.widget.placepage.PlacePageView
android:id="@+id/info_box"
android:layout_width="@dimen/panel_width"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/toolbar_search"
android:layout_margin="@dimen/margin_medium"/>
android:layout_alignParentBottom="true"
placePage:animationType="bottom"/>
<RelativeLayout
android:id="@+id/rl__routing_box"

View file

@ -0,0 +1,297 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="vertical">
<LinearLayout
android:id="@+id/rl__place_details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/margin_medium_and_half">
<LinearLayout
android:id="@+id/ll__place_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv__place_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_adress"/>
<TextView
android:id="@+id/tv__place_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/iv__place_name"
android:text="Some address"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll__place_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_small"
android:background="?attr/clickableBackground"
android:orientation="horizontal"
android:paddingBottom="@dimen/margin_small"
android:paddingTop="@dimen/margin_small">
<ImageView
android:id="@+id/iv__place_phone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_phone"/>
<TextView
android:id="@+id/tv__place_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="9119992"
android:textColor="@color/text_place_page_blue"
android:textSize="@dimen/place_page_subtitle"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll__place_website"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/clickableBackground"
android:orientation="horizontal"
android:paddingBottom="@dimen/margin_small"
android:paddingTop="@dimen/margin_small">
<ImageView
android:id="@+id/iv__place_website"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_link"/>
<TextView
android:id="@+id/tv__place_website"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="www.test.com"
android:textColor="@color/text_place_page_blue"
android:textSize="@dimen/place_page_subtitle"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll__place_schedule"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/clickableBackground"
android:orientation="horizontal"
android:paddingBottom="@dimen/margin_small"
android:paddingTop="@dimen/margin_small">
<ImageView
android:id="@+id/iv__place_schedule"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_worktime"/>
<TextView
android:id="@+id/tv__place_schedule"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Пн-Пт 10:00-23:00"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll__place_latlon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/clickableBackground"
android:orientation="horizontal"
android:paddingBottom="@dimen/margin_small"
android:paddingTop="@dimen/margin_small">
<ImageView
android:id="@+id/iv__place_latlon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_position"/>
<TextView
android:id="@+id/tv__place_latlon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="31.21345, 2.234 235"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll__place_wifi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_medium"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv__place_wifi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_wifi"/>
<TextView
android:id="@+id/tv__place_wifi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Yes"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginTop="@dimen/margin_medium_and_half"
android:background="?attr/dividerHorizontal"/>
<RelativeLayout
android:id="@+id/rl__bookmark_details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_medium_and_half">
<ImageView
android:id="@+id/iv__bookmark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_large"
android:src="@drawable/ic_text_bookmark"/>
<TextView
android:id="@+id/tv__bookmark_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignTop="@id/iv__bookmark"
android:layout_toRightOf="@id/iv__bookmark"
android:lineSpacingMultiplier="1.67"
android:text="Name"
android:textColor="@color/text_place_page_subtitle"
android:textSize="@dimen/place_page_sub_subtitle"/>
<EditText
android:id="@+id/et__bookmark_name"
style="@style/PlaceEditableParam"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv__bookmark_title"
android:layout_marginTop="@dimen/margin_tiny"
android:layout_toRightOf="@id/iv__bookmark"
android:hint="@string/name"
android:inputType="textCapWords"
android:lineSpacingMultiplier="1.43"
android:singleLine="true"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_below="@id/et__bookmark_name"
android:layout_marginTop="@dimen/margin_small"
android:background="?attr/dividerHorizontal"/>
<TextView
android:id="@+id/tv__bookmark_group_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/et__bookmark_name"
android:layout_marginTop="@dimen/margin_medium_and_half"
android:layout_toRightOf="@id/iv__bookmark"
android:lineSpacingMultiplier="1.67"
android:text="Group"
android:textColor="@color/text_place_page_subtitle"
android:textSize="@dimen/place_page_sub_subtitle"/>
<LinearLayout
android:id="@+id/ll__group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv__bookmark_group_title"
android:layout_marginTop="@dimen/margin_tiny"
android:layout_toRightOf="@id/iv__bookmark"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/tv__bookmark_group"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawableRight="@drawable/ic_arrow_down"
android:lineSpacingMultiplier="1.43"
android:paddingRight="@dimen/margin_small"
android:text="Great group"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
<ImageView
android:id="@+id/iv__bookmark_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/margin_medium"
android:src="@drawable/color_picker_red_on"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_below="@id/ll__group"
android:layout_marginTop="@dimen/margin_small"
android:background="?android:attr/listDivider"/>
<TextView
android:id="@+id/tv__bookmark_notes_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/ll__group"
android:layout_marginTop="@dimen/margin_medium"
android:layout_toRightOf="@id/iv__bookmark"
android:lineSpacingMultiplier="1.67"
android:text="Notes"
android:textColor="@color/text_place_page_subtitle"
android:textSize="@dimen/place_page_sub_subtitle"/>
<EditText
android:id="@+id/et__bookmark_notes"
style="@style/PlaceEditableParam"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv__bookmark_notes_title"
android:layout_marginTop="@dimen/margin_tiny"
android:layout_toRightOf="@id/iv__bookmark"
android:background="@null"
android:hint="Notes"
android:inputType="text"
android:lineSpacingMultiplier="1.43"
android:singleLine="true"
android:textColor="@color/text_place_page"
android:textSize="@dimen/place_page_subtitle"/>
</RelativeLayout>
</LinearLayout>
</ScrollView>

View file

@ -0,0 +1,136 @@
<?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:gravity="bottom">
<android.view.SurfaceView
android:id="@+id/map_surfaceview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="bottom|center_horizontal"
android:background="@android:color/transparent"/>
<com.mapswithme.maps.widget.placepage.PlacePageView
android:id="@+id/info_box"
android:layout_width="@dimen/panel_width"
android:layout_height="wrap_content"
android:layout_below="@+id/toolbar_search"
android:layout_margin="@dimen/margin_medium"/>
<RelativeLayout
android:id="@+id/rl__routing_box"
style="@style/MwmLightShadow"
android:layout_width="@dimen/panel_width"
android:layout_height="@dimen/routing_pp_height"
android:layout_below="@+id/toolbar_search"
android:layout_margin="@dimen/margin_medium"
android:background="@drawable/ic_bg_pp">
<RelativeLayout
android:id="@+id/rl__routing_go"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_toLeftOf="@+id/iv__routing_close">
<TextView
android:id="@+id/tv__routing_go"
android:layout_width="wrap_content"
android:layout_height="@dimen/routing_button_height"
android:layout_centerVertical="true"
android:background="?attr/clickableBackground"
android:gravity="bottom"
android:includeFontPadding="false"
android:paddingBottom="10dp"
android:paddingLeft="18dp"
android:paddingRight="18dp"
android:text="@string/routing_go"
android:textColor="@color/downloader_green"
android:textSize="18sp"/>
<View
android:layout_width="20dp"
android:layout_height="2dp"
android:layout_alignLeft="@id/tv__routing_go"
android:layout_alignParentBottom="true"
android:layout_alignRight="@id/tv__routing_go"
android:background="@color/downloader_green"/>
</RelativeLayout>
<ImageView
android:id="@+id/iv__routing_close"
android:layout_width="@dimen/routing_button_width"
android:layout_height="@dimen/routing_button_height"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="?attr/clickableBackground"
android:padding="@dimen/margin_medium"
android:scaleType="center"
android:src="@drawable/ic_close_routing"/>
<TextView
android:id="@+id/tv__routing_distance"
style="@style/TextAppearance.AppCompat.Large"
android:layout_width="wrap_content"
android:layout_height="@dimen/routing_button_height"
android:layout_centerVertical="true"
android:gravity="bottom"
android:includeFontPadding="false"
android:paddingBottom="1dp"
android:paddingLeft="10dp"
android:paddingRight="9dp"/>
</RelativeLayout>
<include
android:id="@+id/layout__turn_instructions"
layout="@layout/map_turn_instructions"
android:layout_width="@dimen/panel_width"
android:layout_height="@dimen/routing_pp_height"
android:layout_below="@+id/toolbar_search"
android:layout_margin="@dimen/margin_medium"
android:visibility="gone"/>
<include
android:id="@+id/navigation_buttons_container_ref"
layout="@layout/map_navigation_buttons"
android:layout_width="wrap_content"
android:layout_height="match_parent"/>
<ImageView
android:id="@+id/fade_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@android:color/black"
android:visibility="gone"/>
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="@dimen/panel_width"
android:layout_height="match_parent"
android:layout_margin="@dimen/margin_medium"/>
<include
android:id="@+id/toolbar_search"
layout="@layout/toolbar_with_search"
android:layout_width="@dimen/panel_width"
android:layout_height="?attr/actionBarSize"
android:layout_margin="@dimen/margin_medium"/>
<include
android:id="@+id/map_bottom_toolbar"
layout="@layout/map_bottom_toolbar"
android:layout_width="@dimen/bottom_panel_width"
android:layout_height="280dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"/>
<include
android:id="@+id/map_bottom_vertical_toolbar"
layout="@layout/map_bottom_vertical_toolbar"
android:layout_width="@dimen/panel_width"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_medium"/>
</RelativeLayout>

View file

@ -14,8 +14,7 @@
layout="@layout/details_place_page"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/pp__buttons"
android:visibility="visible"/>
android:layout_above="@+id/pp__buttons"/>
<include
android:id="@+id/pp__buttons"
@ -29,7 +28,7 @@
layout="@layout/preview_place_page"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/pp__details"/>
android:layout_above="@id/pp__buttons"/>
<View
android:layout_width="match_parent"

View file

@ -26,6 +26,7 @@ public abstract class BasePlacePageAnimationController
protected float mDownCoord;
protected float mTouchSlop;
// Visibility
// TODO consider removal
protected boolean mIsPreviewVisible;
protected boolean mIsPlacePageVisible;
protected OnVisibilityChangedListener mVisibilityChangedListener;

View file

@ -2,16 +2,15 @@ package com.mapswithme.maps.widget.placepage;
import android.support.annotation.NonNull;
import android.support.v4.view.GestureDetectorCompat;
import android.util.Log;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.TranslateAnimation;
import android.view.animation.AccelerateInterpolator;
import com.mapswithme.maps.Framework;
import com.mapswithme.maps.widget.placepage.PlacePageView.State;
import com.mapswithme.util.UiUtils;
import com.nineoldandroids.animation.ValueAnimator;
import com.nineoldandroids.view.ViewHelper;
public class BottomPlacePageAnimationController extends BasePlacePageAnimationController
{
@ -53,7 +52,6 @@ public class BottomPlacePageAnimationController extends BasePlacePageAnimationCo
@Override
protected void initGestureDetector()
{
// Gestures
mGestureDetector = new GestureDetectorCompat(mPlacePage.getContext(), new GestureDetector.SimpleOnGestureListener()
{
private static final int Y_MIN = 1;
@ -70,7 +68,7 @@ public class BottomPlacePageAnimationController extends BasePlacePageAnimationCo
{
if (!mIsGestureHandled)
{
if (distanceY < 0)
if (distanceY < 0f)
{
if (mPlacePage.getState() == State.FULL_PLACEPAGE)
mPlacePage.setState(State.PREVIEW_ONLY);
@ -112,93 +110,133 @@ public class BottomPlacePageAnimationController extends BasePlacePageAnimationCo
protected void showPreview(final boolean show)
{
mPlacePage.setVisibility(View.VISIBLE);
mDetails.setVisibility(View.GONE);
mPreview.setVisibility(View.VISIBLE);
mDetails.setVisibility(View.INVISIBLE);
if (mIsPreviewVisible == show)
return;
TranslateAnimation slide;
ValueAnimator animator;
if (show)
{
slide = UiUtils.generateRelativeSlideAnimation(0, 0, 1, 0);
mPreview.setVisibility(View.VISIBLE);
}
else
{
slide = UiUtils.generateRelativeSlideAnimation(0, 0, 0, 1);
slide.setAnimationListener(new UiUtils.SimpleAnimationListener()
animator = ValueAnimator.ofFloat(mPreview.getHeight(), 0f);
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener()
{
@Override
public void onAnimationEnd(Animation animation)
public void onAnimationUpdate(ValueAnimator animation)
{
mPlacePage.setVisibility(View.GONE);
ViewHelper.setTranslationY(mPreview, (Float) animation.getAnimatedValue());
ViewHelper.setTranslationY(mButtons, (Float) animation.getAnimatedValue());
}
});
}
slide.setDuration(SHORT_ANIM_DURATION);
mPreview.startAnimation(slide);
mButtons.startAnimation(slide);
if (mVisibilityChangedListener != null)
mVisibilityChangedListener.onPreviewVisibilityChanged(show);
else
{
animator = ValueAnimator.ofFloat(0, mPreview.getHeight());
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener()
{
@Override
public void onAnimationUpdate(ValueAnimator animation)
{
ViewHelper.setTranslationY(mPreview, (Float) animation.getAnimatedValue());
ViewHelper.setTranslationY(mButtons, (Float) animation.getAnimatedValue());
if (1f - animation.getAnimatedFraction() < 0.01)
{
mPlacePage.setVisibility(View.INVISIBLE);
mPlacePage.setMapObject(null);
}
}
});
}
animator.setDuration(SHORT_ANIM_DURATION);
animator.setInterpolator(new AccelerateInterpolator());
animator.start();
mIsPreviewVisible = show;
if (mVisibilityChangedListener != null)
mVisibilityChangedListener.onPreviewVisibilityChanged(mIsPreviewVisible);
}
@Override
protected void showPlacePage(final boolean show)
{
mPlacePage.setVisibility(View.VISIBLE);
mDetails.setVisibility(View.VISIBLE);
if (mIsPlacePageVisible == show)
return; // if state is already same as we need
TranslateAnimation slide;
if (show) // slide up
ValueAnimator animator;
final float animHeight = mDetails.getHeight();
if (show)
{
slide = UiUtils.generateRelativeSlideAnimation(0, 0, 1, 0);
slide.setDuration(SHORT_ANIM_DURATION);
mDetails.setVisibility(View.VISIBLE);
}
else // slide down
{
slide = UiUtils.generateRelativeSlideAnimation(0, 0, 0, 1);
slide.setDuration(SHORT_ANIM_DURATION);
slide.setAnimationListener(new UiUtils.SimpleAnimationListener()
animator = ValueAnimator.ofFloat(animHeight, 0f);
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener()
{
@Override
public void onAnimationEnd(Animation animation)
public void onAnimationUpdate(ValueAnimator animation)
{
mDetails.setVisibility(View.GONE);
ViewHelper.setTranslationY(mDetails, (Float) animation.getAnimatedValue());
ViewHelper.setTranslationY(mPreview, (Float) animation.getAnimatedValue() - animHeight);
}
});
}
mDetails.startAnimation(slide);
if (mVisibilityChangedListener != null)
mVisibilityChangedListener.onPlacePageVisibilityChanged(show);
else
{
animator = ValueAnimator.ofFloat(0, animHeight);
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener()
{
@Override
public void onAnimationUpdate(ValueAnimator animation)
{
ViewHelper.setTranslationY(mDetails, (Float) animation.getAnimatedValue());
ViewHelper.setTranslationY(mPreview, (Float) animation.getAnimatedValue() - animHeight);
if (1f - animation.getAnimatedFraction() < 0.01)
{
mDetails.setVisibility(View.INVISIBLE);
ViewHelper.setTranslationY(mPreview, 0f);
}
}
});
}
animator.setDuration(SHORT_ANIM_DURATION);
animator.setInterpolator(new AccelerateInterpolator());
animator.start();
mIsPlacePageVisible = show;
if (mVisibilityChangedListener != null)
mVisibilityChangedListener.onPlacePageVisibilityChanged(mIsPlacePageVisible);
}
@Override
protected void hidePlacePage()
{
final TranslateAnimation slideDown = UiUtils.generateRelativeSlideAnimation(0, 0, 0, 1);
slideDown.setDuration(LONG_ANIM_DURATION);
slideDown.setAnimationListener(new UiUtils.SimpleAnimationListener()
final float animHeight = mPlacePage.getHeight() - mPreview.getTop() - ViewHelper.getTranslationY(mPreview);
final ValueAnimator animator = ValueAnimator.ofFloat(0, animHeight);
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener()
{
@Override
public void onAnimationEnd(Animation animation)
public void onAnimationUpdate(ValueAnimator animation)
{
mIsPlacePageVisible = false;
mIsPreviewVisible = false;
ViewHelper.setTranslationY(mPlacePage, (Float) animation.getAnimatedValue());
mPlacePage.setVisibility(View.GONE);
if (mVisibilityChangedListener != null)
if (1f - animation.getAnimatedFraction() < 0.01)
{
mVisibilityChangedListener.onPreviewVisibilityChanged(false);
mVisibilityChangedListener.onPlacePageVisibilityChanged(false);
mIsPlacePageVisible = false;
mIsPreviewVisible = false;
mPlacePage.setVisibility(View.INVISIBLE);
ViewHelper.setTranslationY(mPlacePage, 0f);
if (mVisibilityChangedListener != null)
{
mVisibilityChangedListener.onPreviewVisibilityChanged(false);
mVisibilityChangedListener.onPlacePageVisibilityChanged(false);
}
}
}
});
mPlacePage.startAnimation(slideDown);
animator.setDuration(LONG_ANIM_DURATION);
animator.setInterpolator(new AccelerateInterpolator());
animator.start();
}
}

View file

@ -114,7 +114,7 @@ public class PlacePageView extends LinearLayout implements View.OnClickListener,
initViews();
initAnimationController(attrs, defStyleAttr);
setVisibility(View.GONE);
setVisibility(View.INVISIBLE);
}
private void initViews()