OsmAnd/OsmAnd/res/layout/map_context_menu_fragment.xml
2017-12-12 15:07:26 +02:00

614 lines
No EOL
30 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
android:id="@+id/context_menu_layout"
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:background="@android:color/transparent"
xmlns:osmand="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:id="@+id/context_menu_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/context_menu_top_shadow_all"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:background="?attr/bg_map_context_menu"
android:orientation="vertical">
<LinearLayout
android:id="@+id/context_menu_top_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/context_menu_padding_margin_default"
android:paddingRight="@dimen/context_menu_padding_margin_default"
android:orientation="horizontal">
<LinearLayout
android:layout_marginTop="@dimen/context_menu_padding_margin_default"
android:layout_marginRight="@dimen/context_menu_padding_margin_default"
android:layout_marginEnd="@dimen/context_menu_padding_margin_default"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/context_menu_line1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/search_address_building"
style="@style/TextAppearance.ContextMenuTitle"/>
<LinearLayout
android:layout_marginTop="@dimen/context_menu_subtitle_margin"
android:id="@+id/context_menu_line2_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/context_menu_line2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/amenity_type_finance"
style="@style/TextAppearance.ContextMenuSubtitle"/>
</LinearLayout>
</LinearLayout>
<ImageView
android:id="@+id/context_menu_icon_view"
android:layout_width="@dimen/map_widget_icon"
android:layout_height="@dimen/map_widget_icon"
android:layout_marginTop="@dimen/context_menu_padding_margin_default"
android:src="@drawable/ic_action_building_number"/>
</LinearLayout>
<GridView
android:paddingLeft="@dimen/context_menu_padding_margin_default"
android:paddingRight="@dimen/context_menu_padding_margin_default"
android:visibility="gone"
android:horizontalSpacing="@dimen/context_menu_padding_margin_medium"
android:id="@+id/transport_stop_routes_grid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:numColumns="10" />
<LinearLayout
android:paddingLeft="@dimen/context_menu_padding_margin_default"
android:paddingRight="@dimen/context_menu_padding_margin_default"
android:layout_marginTop="@dimen/context_menu_padding_margin_tiny"
android:layout_marginBottom="@dimen/context_menu_direction_margin"
android:gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="@dimen/context_menu_sub_info_height"
android:orientation="horizontal">
<TextView
android:layout_marginRight="@dimen/context_menu_padding_margin_small"
android:layout_marginEnd="@dimen/context_menu_padding_margin_small"
tools:text="Closed till 10:00"
android:id="@+id/opening_hours_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<LinearLayout
android:id="@+id/compass_layout"
android:layout_width="wrap_content"
android:layout_height="@dimen/context_menu_sub_info_height"
android:orientation="horizontal">
<ImageView
tools:src="@drawable/ic_direction_arrow"
android:id="@+id/direction"
android:layout_width="@dimen/directionIconSize"
android:layout_height="@dimen/directionIconSize"
android:layout_marginTop="1sp"
android:layout_gravity="center_vertical"/>
<TextView
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="2dp"
android:layout_marginStart="2dp"
tools:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
tools:text="100500 km"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/title_button_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:orientation="horizontal"
android:paddingBottom="@dimen/context_menu_padding_margin_small"
android:visibility="gone"
tools:visibility="visible">
<LinearLayout
android:layout_marginLeft="@dimen/context_menu_padding_margin_small"
android:layout_marginRight="@dimen/context_menu_padding_margin_small"
android:id="@+id/title_button_view"
android:background="?attr/ctx_menu_controller_bg"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="@dimen/context_menu_controller_height"
android:orientation="horizontal">
<net.osmand.plus.widgets.TextViewEx
osmand:typeface="@string/font_roboto_medium"
android:id="@+id/title_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:gravity="center_vertical"
android:paddingLeft="@dimen/context_menu_button_padding_x"
android:paddingRight="@dimen/context_menu_button_padding_x"
android:textAllCaps="true"
android:text="@string/recording_context_menu_play"
android:textColor="?attr/ctx_menu_controller_text_color"
android:textSize="@dimen/default_desc_text_size"/>
<TextView
android:id="@+id/title_button_right_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="-4dp"
android:gravity="center_vertical"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
tools:text="— 00:26"/>
</LinearLayout>
<LinearLayout
android:layout_marginLeft="@dimen/context_menu_padding_margin_small"
android:layout_marginRight="@dimen/context_menu_padding_margin_small"
android:id="@+id/title_button_right_view"
android:background="?attr/ctx_menu_controller_bg"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="@dimen/context_menu_controller_height"
android:orientation="horizontal">
<net.osmand.plus.widgets.TextViewEx
osmand:typeface="@string/font_roboto_medium"
android:textAllCaps="true"
android:id="@+id/title_button_right"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:gravity="center_vertical"
android:paddingLeft="@dimen/context_menu_button_padding_x"
android:paddingRight="@dimen/context_menu_button_padding_x"
android:text="@string/shared_string_delete"
android:textColor="?attr/ctx_menu_controller_text_color"
android:textSize="@dimen/default_desc_text_size"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/download_buttons_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:orientation="horizontal"
android:paddingBottom="@dimen/context_menu_padding_margin_small"
android:visibility="gone"
tools:visibility="visible">
<LinearLayout
android:id="@+id/download_button_left_view"
android:background="?attr/ctx_menu_controller_bg"
android:layout_marginLeft="@dimen/context_menu_padding_margin_small"
android:layout_marginRight="@dimen/context_menu_padding_margin_small"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="@dimen/context_menu_controller_height">
<net.osmand.plus.widgets.TextViewEx
osmand:typeface="@string/font_roboto_medium"
android:textAllCaps="true"
android:id="@+id/download_button_left"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:gravity="center_vertical"
android:paddingLeft="@dimen/context_menu_button_padding_x"
android:paddingRight="@dimen/context_menu_button_padding_x"
android:text="@string/shared_string_download"
android:textColor="?attr/ctx_menu_controller_text_color"
android:textSize="@dimen/default_desc_text_size"/>
</LinearLayout>
<LinearLayout
android:id="@+id/download_button_right_view"
android:background="?attr/ctx_menu_controller_bg"
android:layout_marginLeft="@dimen/context_menu_padding_margin_small"
android:layout_marginRight="@dimen/context_menu_padding_margin_small"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="@dimen/context_menu_controller_height">
<net.osmand.plus.widgets.TextViewEx
osmand:typeface="@string/font_roboto_medium"
android:textAllCaps="true"
android:id="@+id/download_button_right"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:gravity="center_vertical"
android:paddingLeft="@dimen/context_menu_button_padding_x"
android:paddingRight="@dimen/context_menu_button_padding_x"
android:text="@string/shared_string_delete"
android:textColor="?attr/ctx_menu_controller_text_color"
android:textSize="@dimen/default_desc_text_size"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_marginBottom="@dimen/context_menu_padding_margin_small"
android:visibility="gone"
tools:visibility="visible"
android:clickable="true"
android:id="@+id/title_button_bottom_view"
android:background="?attr/ctx_menu_controller_bg"
android:layout_marginLeft="@dimen/context_menu_padding_margin_small"
android:layout_marginRight="@dimen/context_menu_padding_margin_small"
android:layout_width="match_parent"
android:layout_height="@dimen/context_menu_controller_height"
android:orientation="horizontal">
<net.osmand.plus.widgets.TextViewEx
osmand:typeface="@string/font_roboto_medium"
android:textAllCaps="true"
android:id="@+id/title_button_bottom"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:gravity="center_vertical"
android:paddingLeft="@dimen/context_menu_button_padding_x"
android:paddingRight="@dimen/context_menu_button_padding_x"
android:text="@string/shared_string_others"
android:textColor="?attr/ctx_menu_controller_text_color"
android:textSize="@dimen/default_desc_text_size"/>
</LinearLayout>
<LinearLayout
android:id="@+id/title_progress_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:gravity="center_vertical"
android:minHeight="@dimen/context_menu_action_buttons_h"
android:orientation="horizontal"
android:paddingBottom="@dimen/context_menu_padding_margin_small"
android:paddingLeft="@dimen/context_menu_progress_padding_left"
android:paddingStart="@dimen/context_menu_progress_padding_left"
android:paddingRight="@dimen/context_menu_progress_padding_right"
android:paddingEnd="@dimen/context_menu_progress_padding_right"
android:visibility="gone"
tools:visibility="visible">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginRight="12dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/progressTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:visibility="visible"
tools:text="@string/shared_string_downloading"/>
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible"/>
</LinearLayout>
<ImageView
android:id="@+id/progressButton"
android:contentDescription="@string/shared_string_close"
android:layout_width="@dimen/context_menu_progress_cancel_button_size"
android:layout_height="@dimen/context_menu_progress_cancel_button_size"
android:layout_gravity="center_vertical"
android:background="?attr/selectableItemBackground"
android:scaleType="center"
tools:src="@drawable/map_action_cancel"/>
</LinearLayout>
</LinearLayout>
<View
android:id="@+id/buttons_top_border"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/ctx_menu_divider"/>
<LinearLayout
android:paddingLeft="@dimen/context_menu_padding_margin_small"
android:paddingRight="@dimen/context_menu_padding_margin_small"
android:id="@+id/context_menu_buttons"
android:layout_width="match_parent"
android:layout_height="@dimen/context_menu_action_buttons_height"
android:orientation="horizontal">
<LinearLayout
android:background="?selectableItemBackground"
android:clickable="true"
android:id="@+id/context_menu_fav_view"
android:gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="@dimen/context_menu_main_actions_padding_top"
android:paddingBottom="@dimen/context_menu_padding_margin_small">
<ImageView
android:id="@+id/context_menu_fav_image_view"
android:contentDescription="@string/shared_string_add_to_favorites"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="center"
android:src="@drawable/map_action_fav_dark"/>
<net.osmand.plus.widgets.TextViewEx
android:maxLines="1"
android:ellipsize="end"
android:id="@+id/context_menu_fav_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="@string/shared_string_add"
android:textColor="@color/ctx_menu_buttons_text_color"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_regular"/>
</LinearLayout>
<LinearLayout
android:background="?selectableItemBackground"
android:clickable="true"
android:id="@+id/context_menu_route_view"
android:gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="@dimen/context_menu_main_actions_padding_top"
android:paddingBottom="@dimen/context_menu_padding_margin_small">
<ImageView
android:id="@+id/context_menu_route_image_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="center"
android:src="@drawable/map_action_flag_dark"/>
<net.osmand.plus.widgets.TextViewEx
android:maxLines="1"
android:ellipsize="end"
android:id="@+id/context_menu_route_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/shared_string_marker"
android:textColor="@color/ctx_menu_buttons_text_color"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_regular"/>
</LinearLayout>
<LinearLayout
android:background="?selectableItemBackground"
android:clickable="true"
android:id="@+id/context_menu_share_view"
android:gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="@dimen/context_menu_main_actions_padding_top"
android:paddingBottom="@dimen/context_menu_padding_margin_small">
<ImageView
android:id="@+id/context_menu_share_image_view"
android:contentDescription="@string/context_menu_item_share_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="center"
android:src="@drawable/map_action_gshare_dark"/>
<net.osmand.plus.widgets.TextViewEx
android:maxLines="1"
android:ellipsize="end"
android:id="@+id/context_menu_share_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/shared_string_share"
android:textColor="@color/ctx_menu_buttons_text_color"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_regular"/>
</LinearLayout>
<LinearLayout
android:background="?selectableItemBackground"
android:clickable="true"
android:id="@+id/context_menu_more_view"
android:gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="@dimen/context_menu_main_actions_padding_top"
android:paddingBottom="@dimen/context_menu_padding_margin_small">
<ImageView
android:id="@+id/context_menu_more_image_view"
android:contentDescription="@string/shared_string_more"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="center"
android:src="@drawable/map_overflow_menu_white"/>
<net.osmand.plus.widgets.TextViewEx
android:maxLines="1"
android:ellipsize="end"
android:id="@+id/context_menu_more_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/shared_string_actions"
android:textColor="@color/ctx_menu_buttons_text_color"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_regular"/>
</LinearLayout>
</LinearLayout>
<View
android:id="@+id/buttons_bottom_border"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/ctx_menu_divider"/>
<LinearLayout
android:id="@+id/context_menu_bottom_buttons"
android:layout_width="match_parent"
android:layout_height="@dimen/context_menu_buttons_bottom_height">
<net.osmand.plus.widgets.TextViewEx
android:textAllCaps="true"
android:background="?attr/selectableItemBackground"
android:id="@+id/context_menu_details_button"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:paddingLeft="@dimen/context_menu_padding_margin_default"
android:paddingRight="@dimen/context_menu_padding_margin_default"
android:gravity="start|center_vertical"
android:layout_gravity="center_vertical"
tools:textColor="?attr/contextMenuButtonColor"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
android:text="@string/description"/>
<net.osmand.plus.widgets.TextViewEx
android:textAllCaps="true"
android:background="?attr/selectableItemBackground"
android:id="@+id/context_menu_directions_button"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:paddingLeft="@dimen/context_menu_padding_margin_default"
android:paddingRight="@dimen/context_menu_padding_margin_default"
android:gravity="end|center_vertical"
tools:textColor="?attr/contextMenuButtonColor"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
android:text="@string/get_directions"/>
</LinearLayout>
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:foreground="@drawable/bg_contextmenu_shadow"
android:foregroundGravity="top|fill_horizontal">
<ScrollView
android:id="@+id/context_menu_bottom_scroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:background="?attr/ctx_menu_info_view_bg">
<LinearLayout
android:id="@+id/context_menu_bottom_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:background="?attr/ctx_menu_info_view_bg"
android:orientation="vertical">
</LinearLayout>
</ScrollView>
</FrameLayout>
</LinearLayout>
<FrameLayout
android:id="@+id/context_menu_fab_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:visibility="gone">
<LinearLayout
android:id="@+id/context_menu_zoom_buttons"
android:layout_width="@dimen/fab_size_with_shadow"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:gravity="center"
android:layout_marginRight="@dimen/fab_margin_right"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="visible">
<ImageButton
android:id="@+id/context_menu_zoom_in_button"
android:layout_width="@dimen/map_button_size"
android:layout_height="@dimen/map_button_size"
android:background="@drawable/btn_circle"
android:contentDescription="@string/zoomIn"
tools:src="@drawable/ic_action_test_light"/>
<ImageButton
android:id="@+id/context_menu_zoom_out_button"
android:layout_width="@dimen/map_button_size"
android:layout_height="@dimen/map_button_size"
android:layout_marginTop="@dimen/map_button_spacing"
android:background="@drawable/btn_circle"
android:contentDescription="@string/zoomOut"
tools:src="@drawable/ic_action_test_light"/>
</LinearLayout>
</FrameLayout>
</FrameLayout>