OsmAnd/OsmAnd/res/layout/map_hud_top.xml

301 lines
No EOL
12 KiB
XML

<?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:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<!-- TOP ROW -->
<FrameLayout
android:id="@+id/map_top_bar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/btn_flat"
android:minHeight="@dimen/map_address_height">
<!-- android:layout_weight="1" to show properly next turn -->
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp">
<TextView
android:id="@+id/map_address_text_shadow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="end"
android:maxLines="1"
android:singleLine="true"
android:textColor="@color/color_black"
android:textSize="@dimen/map_widget_text_size"
tools:text="Long Street Name">
</TextView>
<TextView
android:id="@+id/map_address_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="end"
android:maxLines="1"
android:singleLine="true"
android:textColor="@color/color_black"
android:textSize="@dimen/map_widget_text_size"
tools:text="Long Street Name">
</TextView>
</FrameLayout>
<LinearLayout
android:id="@+id/waypoint_info_bar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone">
<ImageView
android:id="@+id/waypoint_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/map_button_margin"
android:layout_marginRight="@dimen/map_button_margin"
android:src="@drawable/ic_action_test_light"/>
<TextView
android:id="@+id/waypoint_dist"
android:layout_width="60dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="4dp"
android:maxLines="2"
android:textColor="@color/wpt_distance_color"
android:textSize="@dimen/default_desc_text_size"
android:textStyle="bold"/>
<FrameLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="4dp"
android:layout_weight="1">
<TextView
android:id="@+id/waypoint_text_shadow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:textColor="@color/color_black"
android:textSize="@dimen/map_button_text_size"
tools:text="Waypoint"/>
<TextView
android:id="@+id/waypoint_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:textColor="@color/color_black"
android:textSize="@dimen/map_button_text_size"
tools:text="Waypoint"/>
</FrameLayout>
<ImageButton
android:id="@+id/waypoint_more"
android:layout_width="@dimen/map_address_height"
android:layout_height="@dimen/map_address_height"
android:background="@drawable/btn_circle_transparent"
android:src="@drawable/ic_action_test_light"/>
<ImageButton
android:id="@+id/waypoint_close"
android:layout_width="@dimen/map_address_height"
android:layout_height="@dimen/map_address_height"
android:background="@drawable/btn_circle_transparent"
android:src="@drawable/ic_action_test_light"/>
</LinearLayout>
</FrameLayout>
<!-- Widgets -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- LEFT widgets colon -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="top|left"
android:layout_weight="0.45"
android:orientation="vertical">
<LinearLayout
android:id="@+id/map_left_widgets_panel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|left"
android:orientation="vertical">
<!--
<include layout="@layout/map_hud_widget" />
<include layout="@layout/map_hud_widget" />
<include layout="@layout/map_hud_widget" />
-->
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|left"
android:layout_marginLeft="@dimen/map_button_margin"
android:layout_marginTop="@dimen/map_button_margin"
android:orientation="horizontal">
<ImageButton
android:id="@+id/map_layers_button"
android:layout_width="@dimen/map_small_button_size"
android:layout_height="@dimen/map_small_button_size"
android:background="@drawable/btn_inset_circle_trans"
android:src="@drawable/ic_action_test_light"/>
<ImageButton
android:id="@+id/map_compass_button"
android:layout_width="@dimen/map_small_button_size"
android:layout_height="@dimen/map_small_button_size"
android:layout_marginLeft="@dimen/map_small_button_margin"
android:background="@drawable/btn_inset_circle_trans"
android:src="@drawable/ic_action_test_light"/>
</LinearLayout>
</LinearLayout>
<!-- empty block to not let widgets grow more than 45% -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="0.55">
</LinearLayout>
</LinearLayout>
<!-- RIGHT widgets colon -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="1">
<!-- empty block to not let widgets grow more than 45% -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="0.55">
</LinearLayout>
<FrameLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="top|right"
android:layout_weight="0.45">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|right"
android:orientation="vertical">
<LinearLayout
android:id="@+id/map_right_widgets_panel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|right"
android:orientation="vertical">
<include layout="@layout/map_hud_widget"/>
<include layout="@layout/map_hud_widget"/>
</LinearLayout>
<ImageButton
android:id="@+id/map_collapse_button"
android:layout_width="@dimen/map_small_button_size"
android:layout_height="@dimen/map_small_button_size"
android:layout_gravity="top|center_horizontal"
android:background="@drawable/btn_inset_circle_trans"
android:src="@drawable/ic_action_test_light"/>
</LinearLayout>
</FrameLayout>
</LinearLayout>
<!-- CENTER -->
<LinearLayout
android:id="@+id/map_center_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|center"
android:layout_marginTop="@dimen/map_button_margin"
android:background="@drawable/btn_round"
android:orientation="vertical"
android:visibility="gone">
<ImageView
android:id="@+id/map_lanes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_weight="1">
<TextView
android:id="@+id/map_lanes_dist_text_shadow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:maxLines="1"
android:textColor="@color/color_black"
android:textSize="@dimen/map_widget_text_size_small"
tools:text="1048 km"/>
<TextView
android:id="@+id/map_lanes_dist_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:maxLines="1"
android:textColor="@color/color_black"
android:textSize="@dimen/map_widget_text_size_small"
tools:text="1048 km"/>
</FrameLayout>
<ProgressBar
android:id="@+id/map_horizontal_progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="@dimen/map_routing_progress_width"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/map_button_margin"
android:layout_marginRight="@dimen/map_button_margin"
android:max="100"
android:progress="60"
android:visibility="gone"/>
</LinearLayout>
</FrameLayout>
</LinearLayout>