Merge pull request #10639 from osmandapp/Track-tab-gpx

Track tab gpx
This commit is contained in:
Vitaliy 2021-01-25 09:50:45 +02:00 committed by GitHub
commit 7a59d4f45e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 863 additions and 1015 deletions

View file

@ -1,368 +1,321 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color">
xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.github.mikephil.charting.charts.LineChart
android:id="@+id/chart"
android:layout_width="match_parent"
android:layout_height="@dimen/list_item_description_width"
android:layout_gravity="center_vertical" />
<com.github.mikephil.charting.charts.LineChart
android:id="@+id/chart"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_gravity="center_vertical"/>
<LinearLayout
android:id="@+id/gpx_join_gaps_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/card_row_min_height"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/gpx_join_gaps_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/card_row_min_height"
android:orientation="horizontal">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/gpx_join_gaps_text"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingStart="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:text="@string/join_segments"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_regular" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/gpx_join_gaps_text"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:text="@string/join_segments"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_regular"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/gpx_join_gaps_switch"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:paddingStart="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/gpx_join_gaps_switch"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/average_range"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="@dimen/context_menu_first_line_top_margin"
android:paddingBottom="@dimen/content_padding_small">
<LinearLayout
android:id="@+id/average_range"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="13dp"
android:paddingBottom="11dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding_small"
android:layout_marginRight="@dimen/content_padding_small"
android:layout_weight="1"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingStart="16dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/average_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
osmand:srcCompat="@drawable/ic_action_altitude_average"/>
<TextView
android:id="@+id/average_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="@string/average_altitude"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_desc_text_size" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="18dp"
android:layout_marginStart="18dp">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/average_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="40 m" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/average_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
tools:text="40 m"
android:textColor="?android:attr/textColorPrimary"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_desc_text_size"/>
</LinearLayout>
<TextView
android:id="@+id/average_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:layout_marginTop="3dp"
android:text="@string/average_altitude"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/average_icon"
android:layout_width="wrap_content"
android:layout_height="@dimen/poi_icon_size"
android:layout_marginTop="@dimen/subHeaderPadding"
osmand:srcCompat="@drawable/ic_action_altitude_average" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/content_padding_small"
android:layout_marginLeft="@dimen/content_padding_small"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
android:layout_weight="1"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingStart="16dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/range_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
osmand:srcCompat="@drawable/ic_action_altitude_average"/>
<TextView
android:id="@+id/range_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="@string/altitude_range"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_desc_text_size" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="18dp"
android:layout_marginStart="18dp">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/range_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="30m - 53m" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/range_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
tools:text="30m - 53m"
android:textColor="?android:attr/textColorPrimary"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_desc_text_size"/>
</LinearLayout>
<TextView
android:id="@+id/range_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:layout_marginTop="3dp"
android:text="@string/altitude_range"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/range_icon"
android:layout_width="wrap_content"
android:layout_height="@dimen/poi_icon_size"
android:layout_marginTop="@dimen/subHeaderPadding"
osmand:srcCompat="@drawable/ic_action_altitude_average" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/list_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/list_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="@dimen/content_padding_small"
android:layout_marginLeft="@dimen/content_padding_small"
android:layout_marginEnd="@dimen/content_padding_small"
android:layout_marginRight="@dimen/content_padding_small"
android:background="?attr/dashboard_divider" />
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingRight="8dp"
android:paddingStart="16dp"
android:paddingEnd="8dp">
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
<LinearLayout
android:id="@+id/ascent_descent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="@dimen/context_menu_first_line_top_margin"
android:paddingBottom="@dimen/content_padding_small">
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding_small"
android:layout_marginRight="@dimen/content_padding_small"
android:layout_weight="1"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:paddingLeft="8dp"
android:paddingRight="16dp"
android:paddingStart="8dp"
android:paddingEnd="16dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
<TextView
android:id="@+id/ascent_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="@string/altitude_ascent"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_desc_text_size" />
</LinearLayout>
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/ascent_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="174" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ascent_descent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="13dp"
android:paddingBottom="11dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/ascent_icon"
android:layout_width="wrap_content"
android:layout_height="@dimen/poi_icon_size"
android:layout_marginTop="@dimen/subHeaderPadding"
osmand:srcCompat="@drawable/ic_action_altitude_ascent" />
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingStart="16dp">
</LinearLayout>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/ascent_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
osmand:srcCompat="@drawable/ic_action_altitude_ascent"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding_small"
android:layout_marginRight="@dimen/content_padding_small"
android:layout_weight="1"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="18dp"
android:layout_marginStart="18dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/ascent_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
tools:text="174"
android:textColor="?android:attr/textColorPrimary"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_desc_text_size"/>
<TextView
android:id="@+id/descent_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="@string/altitude_descent"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_desc_text_size" />
<TextView
android:id="@+id/ascent_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:layout_marginTop="3dp"
android:text="@string/altitude_ascent"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size"/>
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/descent_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="164" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/descent_icon"
android:layout_width="wrap_content"
android:layout_height="@dimen/poi_icon_size"
android:layout_marginTop="@dimen/subHeaderPadding"
osmand:srcCompat="@drawable/ic_action_altitude_descent" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingStart="16dp">
</LinearLayout>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/descent_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
osmand:srcCompat="@drawable/ic_action_altitude_descent"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="18dp"
android:layout_marginStart="18dp">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/descent_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
tools:text="164"
android:textColor="?android:attr/textColorPrimary"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_desc_text_size"/>
<LinearLayout
android:id="@+id/details_view"
android:layout_width="match_parent"
android:layout_height="48dp"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="@+id/descent_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:layout_marginTop="3dp"
android:text="@string/altitude_descent"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size"/>
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/analyze_on_map"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:gravity="start|center_vertical"
android:paddingStart="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:text="@string/analyze_on_map"
android:textColor="?attr/color_dialog_buttons"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_regular" />
</LinearLayout>
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/overflow_menu"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:gravity="end|center_vertical"
android:paddingStart="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:text="@string/shared_string_options"
android:textColor="?attr/color_dialog_buttons"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_regular" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
<LinearLayout
android:id="@+id/details_view"
android:layout_width="match_parent"
android:layout_height="48dp"
android:orientation="horizontal"
android:gravity="center">
<ImageButton
android:visibility="gone"
tools:visibility="visible"
android:id="@+id/overflow_menu"
android:background="@null"
android:paddingRight="16dp"
android:paddingLeft="16dp"
android:layout_width="wrap_content"
android:layout_height="match_parent"
tools:src="@drawable/ic_overflow_menu_dark"
android:paddingStart="16dp"
android:paddingEnd="16dp" />
<net.osmand.plus.widgets.TextViewEx
android:background="?attr/selectableItemBackground"
android:id="@+id/split_interval"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:gravity="start|center_vertical"
android:textColor="?attr/color_dialog_buttons"
android:textSize="@dimen/default_sub_text_size"
osmand:textAllCapsCompat="true"
osmand:typeface="@string/font_roboto_medium"
android:text="@string/gpx_split_interval"
android:paddingEnd="16dp"
android:paddingStart="16dp" />
<net.osmand.plus.widgets.TextViewEx
android:background="?attr/selectableItemBackground"
android:id="@+id/analyze_on_map"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:gravity="end|center_vertical"
android:textColor="?attr/color_dialog_buttons"
android:textSize="@dimen/default_sub_text_size"
osmand:textAllCapsCompat="true"
osmand:typeface="@string/font_roboto_medium"
android:text="@string/analyze_on_map"
android:paddingEnd="16dp"
android:paddingStart="16dp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>

View file

@ -1,386 +1,339 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color">
xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.github.mikephil.charting.charts.LineChart
android:id="@+id/chart"
android:layout_width="match_parent"
android:layout_height="@dimen/list_item_description_width"
android:layout_gravity="center_vertical" />
<com.github.mikephil.charting.charts.LineChart
android:id="@+id/chart"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_gravity="center_vertical"/>
<LinearLayout
android:id="@+id/gpx_join_gaps_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/card_row_min_height"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/gpx_join_gaps_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/card_row_min_height"
android:orientation="horizontal">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/gpx_join_gaps_text"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingStart="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:text="@string/join_segments"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_regular" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/gpx_join_gaps_text"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:text="@string/join_segments"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_regular"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/gpx_join_gaps_switch"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:paddingStart="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/gpx_join_gaps_switch"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/distance_time_span"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="@dimen/context_menu_first_line_top_margin"
android:paddingBottom="@dimen/content_padding">
<LinearLayout
android:id="@+id/distance_time_span"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="13dp"
android:paddingBottom="11dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding_small"
android:layout_marginRight="@dimen/content_padding_small"
android:layout_weight="1"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingStart="16dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/distance_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
osmand:srcCompat="@drawable/ic_action_polygom_dark"/>
<TextView
android:id="@+id/distance_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="@string/distance"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_desc_text_size" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="18dp"
android:layout_marginStart="18dp">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/distance_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="40 km" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/distance_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
tools:text="40 km"
android:textColor="?android:attr/textColorPrimary"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_desc_text_size"/>
</LinearLayout>
<TextView
android:id="@+id/distance_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:layout_marginTop="3dp"
android:text="@string/distance"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/distance_icon"
android:layout_width="wrap_content"
android:layout_height="@dimen/poi_icon_size"
android:layout_marginTop="@dimen/subHeaderPadding"
osmand:srcCompat="@drawable/ic_action_distance_16" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding_small"
android:layout_marginRight="@dimen/content_padding_small"
android:layout_weight="1"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingStart="16dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/duration_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
osmand:srcCompat="@drawable/ic_action_time_start"/>
<TextView
android:id="@+id/duration_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="@string/shared_string_time_span"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_desc_text_size" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="18dp"
android:layout_marginStart="18dp">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/duration_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="3:32:44" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/duration_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
tools:text="3:32:44"
android:textColor="?android:attr/textColorPrimary"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_desc_text_size"/>
</LinearLayout>
<TextView
android:id="@+id/duration_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:layout_marginTop="3dp"
android:text="@string/shared_string_time_span"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/duration_icon"
android:layout_width="wrap_content"
android:layout_height="@dimen/poi_icon_size"
android:layout_marginTop="@dimen/subHeaderPadding"
osmand:srcCompat="@drawable/ic_action_time_span_16" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/list_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/list_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="@dimen/content_padding_small"
android:layout_marginLeft="@dimen/content_padding_small"
android:layout_marginEnd="@dimen/content_padding_small"
android:layout_marginRight="@dimen/content_padding_small"
android:background="?attr/dashboard_divider" />
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding_half"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding_half">
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
<LinearLayout
android:id="@+id/start_end_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="@dimen/context_menu_first_line_top_margin"
android:paddingBottom="@dimen/content_padding_small">
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding_small"
android:layout_marginRight="@dimen/content_padding_small"
android:layout_weight="1"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:paddingLeft="@dimen/content_padding_half"
android:paddingRight="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding_half">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
<TextView
android:id="@+id/start_time_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="@string/shared_string_start_time"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_desc_text_size" />
</LinearLayout>
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/start_time_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="15:04:58" />
</LinearLayout>
<TextView
android:id="@+id/start_date_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
tools:text="Aug 8, 2016" />
<LinearLayout
android:id="@+id/start_end_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="13dp"
android:paddingBottom="11dp">
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="@dimen/content_padding"
android:paddingStart="@dimen/content_padding">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/start_time_icon"
android:layout_width="wrap_content"
android:layout_height="@dimen/poi_icon_size"
android:layout_marginTop="@dimen/subHeaderPadding"
osmand:srcCompat="@drawable/ic_action_time_start_16" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/start_time_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
osmand:srcCompat="@drawable/ic_action_time_start"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="18dp"
android:layout_marginStart="18dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding_small"
android:layout_marginRight="@dimen/content_padding_small"
android:layout_weight="1"
android:orientation="horizontal">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/start_time_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
tools:text="15:04:58"
android:textColor="?android:attr/textColorPrimary"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_desc_text_size"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/start_date_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
tools:text="Aug 8, 2016"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_desc_text_size"/>
<TextView
android:id="@+id/end_time_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="@string/shared_string_end_time"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_desc_text_size" />
<TextView
android:id="@+id/start_time_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:layout_marginTop="@dimen/content_padding_half"
android:text="@string/shared_string_start_time"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size"/>
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/end_time_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="20:58:00" />
</LinearLayout>
<TextView
android:id="@+id/end_date_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
tools:text="Aug 8, 2016" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:paddingLeft="@dimen/content_padding"
android:paddingStart="@dimen/content_padding">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/end_time_icon"
android:layout_width="wrap_content"
android:layout_height="@dimen/poi_icon_size"
android:layout_marginTop="@dimen/subHeaderPadding"
osmand:srcCompat="@drawable/ic_action_time_end_16" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/end_time_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
osmand:srcCompat="@drawable/ic_action_time_start"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="18dp"
android:layout_marginStart="18dp">
</LinearLayout>
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/end_time_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
tools:text="20:58:00"
android:textColor="?android:attr/textColorPrimary"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_desc_text_size"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider" />
<TextView
android:id="@+id/end_date_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
tools:text="Aug 8, 2016"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_desc_text_size"/>
<LinearLayout
android:id="@+id/details_view"
android:layout_width="match_parent"
android:layout_height="48dp"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="@+id/end_time_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:layout_marginTop="@dimen/content_padding_half"
android:text="@string/shared_string_end_time"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size"/>
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/analyze_on_map"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:gravity="start|center_vertical"
android:paddingStart="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:text="@string/analyze_on_map"
android:textColor="?attr/color_dialog_buttons"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_regular" />
</LinearLayout>
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/overflow_menu"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:gravity="end|center_vertical"
android:paddingStart="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:text="@string/shared_string_options"
android:textColor="?attr/color_dialog_buttons"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_regular" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
<LinearLayout
android:id="@+id/details_view"
android:layout_width="match_parent"
android:layout_height="48dp"
android:orientation="horizontal"
android:gravity="center">
<ImageButton
android:visibility="gone"
tools:visibility="visible"
android:id="@+id/overflow_menu"
android:background="@null"
android:paddingRight="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding"
android:layout_width="wrap_content"
android:layout_height="match_parent"
tools:src="@drawable/ic_overflow_menu_dark"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
<net.osmand.plus.widgets.TextViewEx
android:background="?attr/selectableItemBackground"
android:id="@+id/split_interval"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:gravity="start|center_vertical"
android:textColor="?attr/color_dialog_buttons"
android:textSize="@dimen/default_sub_text_size"
osmand:textAllCapsCompat="true"
osmand:typeface="@string/font_roboto_medium"
android:text="@string/gpx_split_interval"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding" />
<net.osmand.plus.widgets.TextViewEx
android:background="?attr/selectableItemBackground"
android:id="@+id/analyze_on_map"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:gravity="end|center_vertical"
android:textColor="?attr/color_dialog_buttons"
android:textSize="@dimen/default_sub_text_size"
osmand:textAllCapsCompat="true"
osmand:typeface="@string/font_roboto_medium"
android:text="@string/analyze_on_map"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>

View file

@ -1,368 +1,323 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color">
xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.github.mikephil.charting.charts.LineChart
android:id="@+id/chart"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_gravity="center_vertical" />
<com.github.mikephil.charting.charts.LineChart
android:id="@+id/chart"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_gravity="center_vertical"/>
<LinearLayout
android:id="@+id/gpx_join_gaps_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/card_row_min_height"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/gpx_join_gaps_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/card_row_min_height"
android:orientation="horizontal">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/gpx_join_gaps_text"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingStart="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:text="@string/join_segments"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_regular" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/gpx_join_gaps_text"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:text="@string/join_segments"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_regular"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/gpx_join_gaps_switch"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:paddingStart="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/gpx_join_gaps_switch"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/average_max"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="13dp"
android:paddingBottom="11dp">
<LinearLayout
android:id="@+id/average_max"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="13dp"
android:paddingBottom="11dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding_small"
android:layout_marginRight="@dimen/content_padding_small"
android:layout_weight="1"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="@dimen/content_padding"
android:paddingStart="@dimen/content_padding">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/average_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
osmand:srcCompat="@drawable/ic_action_speed"/>
<TextView
android:id="@+id/average_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="@string/average_speed"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_desc_text_size" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="18dp"
android:layout_marginStart="18dp">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/average_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="6.8 km/h" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/average_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
tools:text="6.8 km/h"
android:textColor="?android:attr/textColorPrimary"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_desc_text_size"/>
</LinearLayout>
<TextView
android:id="@+id/average_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:layout_marginTop="3dp"
android:text="@string/average_speed"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/average_icon"
android:layout_width="wrap_content"
android:layout_height="@dimen/poi_icon_size"
android:layout_marginTop="2dp"
osmand:srcCompat="@drawable/ic_action_speed" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/content_padding_small"
android:layout_marginLeft="@dimen/content_padding_small"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
android:layout_weight="1"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:paddingLeft="@dimen/content_padding"
android:paddingStart="@dimen/content_padding">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/max_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
osmand:srcCompat="@drawable/ic_action_max_speed"/>
<TextView
android:id="@+id/max_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="@string/max_speed"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_desc_text_size" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="18dp"
android:layout_marginStart="18dp">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/max_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="31.3 km/h" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/max_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
tools:text="31.3 km/h"
android:textColor="?android:attr/textColorPrimary"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_desc_text_size"/>
</LinearLayout>
<TextView
android:id="@+id/max_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:layout_marginTop="3dp"
android:text="@string/max_speed"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/max_icon"
android:layout_width="wrap_content"
android:layout_height="@dimen/poi_icon_size"
android:layout_marginTop="2dp"
osmand:srcCompat="@drawable/ic_action_max_speed_16" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/list_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/list_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="@dimen/content_padding_small"
android:layout_marginLeft="@dimen/content_padding_small"
android:layout_marginEnd="@dimen/content_padding_small"
android:layout_marginRight="@dimen/content_padding_small"
android:background="?attr/dashboard_divider" />
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding_half"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding_half">
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
</LinearLayout>
<LinearLayout
android:id="@+id/time_distance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="13dp"
android:paddingBottom="11dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:paddingLeft="@dimen/content_padding_half"
android:paddingRight="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding_half">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding_small"
android:layout_marginRight="@dimen/content_padding_small"
android:layout_weight="1"
android:orientation="horizontal">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
</LinearLayout>
<TextView
android:id="@+id/time_moving_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="@string/shared_string_time_moving"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_desc_text_size" />
</LinearLayout>
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/time_moving_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="174" />
<LinearLayout
android:id="@+id/time_distance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="13dp"
android:paddingBottom="11dp">
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="@dimen/content_padding"
android:paddingStart="@dimen/content_padding">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/time_moving_icon"
android:layout_width="wrap_content"
android:layout_height="@dimen/poi_icon_size"
android:layout_marginTop="2dp"
osmand:srcCompat="@drawable/ic_action_time_span" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/time_moving_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
osmand:srcCompat="@drawable/ic_action_time_span"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="18dp"
android:layout_marginStart="18dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/content_padding"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding_small"
android:layout_marginRight="@dimen/content_padding_small"
android:layout_weight="1"
android:orientation="horizontal">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/time_moving_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
tools:text="174"
android:textColor="?android:attr/textColorPrimary"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_desc_text_size"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/time_moving_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:layout_marginTop="3dp"
android:text="@string/shared_string_time_moving"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size"/>
<TextView
android:id="@+id/distance_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:background="@null"
android:text="@string/distance_moving"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_desc_text_size" />
</LinearLayout>
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/distance_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="42 km" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:paddingLeft="@dimen/content_padding"
android:paddingStart="@dimen/content_padding">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/distance_icon"
android:layout_width="wrap_content"
android:layout_height="@dimen/poi_icon_size"
android:layout_marginTop="5dp"
osmand:srcCompat="@drawable/ic_action_polygom_dark" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/distance_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
osmand:srcCompat="@drawable/ic_action_polygom_dark"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="18dp"
android:layout_marginStart="18dp">
</LinearLayout>
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/distance_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
tools:text="42 km"
android:textColor="?android:attr/textColorPrimary"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_desc_text_size"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider" />
<TextView
android:id="@+id/distance_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:layout_marginTop="3dp"
android:text="@string/distance_moving"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size"/>
<LinearLayout
android:id="@+id/details_view"
android:layout_width="match_parent"
android:layout_height="48dp"
android:gravity="center"
android:orientation="horizontal">
</LinearLayout>
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/analyze_on_map"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:gravity="start|center_vertical"
android:paddingStart="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:text="@string/analyze_on_map"
android:textColor="?attr/color_dialog_buttons"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_regular" />
</LinearLayout>
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/overflow_menu"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:gravity="end|center_vertical"
android:paddingStart="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:text="@string/shared_string_options"
android:textColor="?attr/color_dialog_buttons"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_regular" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
<LinearLayout
android:id="@+id/details_view"
android:layout_width="match_parent"
android:layout_height="48dp"
android:orientation="horizontal"
android:gravity="center">
<ImageButton
android:visibility="gone"
tools:visibility="visible"
android:id="@+id/overflow_menu"
android:background="@null"
android:paddingRight="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding"
android:layout_width="wrap_content"
android:layout_height="match_parent"
tools:src="@drawable/ic_overflow_menu_dark"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
<net.osmand.plus.widgets.TextViewEx
android:background="?attr/selectableItemBackground"
android:id="@+id/split_interval"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:gravity="start|center_vertical"
android:textColor="?attr/color_dialog_buttons"
android:textSize="@dimen/default_sub_text_size"
osmand:textAllCapsCompat="true"
osmand:typeface="@string/font_roboto_medium"
android:text="@string/gpx_split_interval"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
<net.osmand.plus.widgets.TextViewEx
android:background="?attr/selectableItemBackground"
android:id="@+id/analyze_on_map"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:gravity="end|center_vertical"
android:textColor="?attr/color_dialog_buttons"
android:textSize="@dimen/default_sub_text_size"
osmand:textAllCapsCompat="true"
osmand:typeface="@string/font_roboto_medium"
android:text="@string/analyze_on_map"
android:paddingStart="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>

View file

@ -9,4 +9,9 @@
android:id="@+id/action_delete"
android:icon="@drawable/ic_action_remove_dark"
android:title="@string/shared_string_delete"/>
<item
android:id="@+id/split_interval"
android:icon="@drawable/ic_action_split_interval"
android:title="@string/gpx_split_interval"/>
</menu>

View file

@ -276,17 +276,7 @@ public class GPXItemPagerAdapter extends PagerAdapter implements CustomTabProvid
openAnalyzeOnMap(GPXTabItemType.GPX_TAB_ITEM_SPEED);
}
});
if (gpxFile.showCurrentTrack) {
view.findViewById(R.id.split_interval).setVisibility(View.GONE);
} else {
view.findViewById(R.id.split_interval).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
openSplitIntervalScreen();
}
});
}
ImageView overflowMenu = view.findViewById(R.id.overflow_menu);
TextView overflowMenu = view.findViewById(R.id.overflow_menu);
if (!gpxItem.group.getTrack().generalTrack) {
setupOptionsPopupMenu(overflowMenu, false);
} else {
@ -294,13 +284,12 @@ public class GPXItemPagerAdapter extends PagerAdapter implements CustomTabProvid
}
}
private void setupOptionsPopupMenu(ImageView overflowMenu, final boolean confirmDeletion) {
overflowMenu.setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_overflow_menu_white));
private void setupOptionsPopupMenu(TextView overflowMenu, final boolean confirmDeletion) {
overflowMenu.setVisibility(View.VISIBLE);
overflowMenu.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
actionsListener.showOptionsPopupMenu(view, getTrkSegment(), confirmDeletion);
actionsListener.showOptionsPopupMenu(view, getTrkSegment(), confirmDeletion, gpxItem);
}
});
}
@ -360,17 +349,7 @@ public class GPXItemPagerAdapter extends PagerAdapter implements CustomTabProvid
openAnalyzeOnMap(GPXTabItemType.GPX_TAB_ITEM_ALTITUDE);
}
});
if (gpxFile.showCurrentTrack) {
view.findViewById(R.id.split_interval).setVisibility(View.GONE);
} else {
view.findViewById(R.id.split_interval).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
openSplitIntervalScreen();
}
});
}
ImageView overflowMenu = view.findViewById(R.id.overflow_menu);
TextView overflowMenu = view.findViewById(R.id.overflow_menu);
if (!gpxItem.group.getTrack().generalTrack) {
setupOptionsPopupMenu(overflowMenu, false);
} else {
@ -437,17 +416,7 @@ public class GPXItemPagerAdapter extends PagerAdapter implements CustomTabProvid
openAnalyzeOnMap(GPXTabItemType.GPX_TAB_ITEM_GENERAL);
}
});
if (gpxFile.showCurrentTrack) {
view.findViewById(R.id.split_interval).setVisibility(View.GONE);
} else {
view.findViewById(R.id.split_interval).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
openSplitIntervalScreen();
}
});
}
ImageView overflowMenu = view.findViewById(R.id.overflow_menu);
TextView overflowMenu = view.findViewById(R.id.overflow_menu);
if (!gpxItem.group.getTrack().generalTrack) {
setupOptionsPopupMenu(overflowMenu, true);
} else {

View file

@ -17,7 +17,7 @@ public interface SegmentActionsListener {
void openSplitInterval(GpxDisplayItem gpxItem, TrkSegment trkSegment);
void showOptionsPopupMenu(View view, TrkSegment trkSegment, boolean confirmDeletion);
void showOptionsPopupMenu(View view, TrkSegment trkSegment, boolean confirmDeletion, GpxDisplayItem gpxItem);
void openAnalyzeOnMap(GpxDisplayItem gpxItem);
}

View file

@ -304,14 +304,19 @@ public class TrackSegmentFragment extends OsmAndListFragment implements TrackBit
}
@Override
public void showOptionsPopupMenu(View view, final TrkSegment segment, final boolean confirmDeletion) {
public void showOptionsPopupMenu(View view, final TrkSegment segment, final boolean confirmDeletion, final GpxDisplayItem gpxItem) {
FragmentActivity activity = getActivity();
if (activity != null) {
optionsPopupMenu = new IconPopupMenu(activity, view.findViewById(R.id.overflow_menu));
Menu menu = optionsPopupMenu.getMenu();
IconPopupMenu optionsPopupMenu = new IconPopupMenu(activity, view.findViewById(R.id.overflow_menu));
final Menu menu = optionsPopupMenu.getMenu();
optionsPopupMenu.getMenuInflater().inflate(R.menu.track_segment_menu, menu);
menu.findItem(R.id.action_edit).setIcon(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_edit_dark));
menu.findItem(R.id.action_delete).setIcon(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_remove_dark));
if (displayHelper.getGpx().showCurrentTrack) {
menu.findItem(R.id.split_interval).setVisible(false);
} else {
menu.findItem(R.id.split_interval).setIcon(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_split_interval));
}
optionsPopupMenu.setOnMenuItemClickListener(new IconPopupMenu.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
@ -336,6 +341,8 @@ public class TrackSegmentFragment extends OsmAndListFragment implements TrackBit
builder.show();
}
return true;
} else if (i == R.id.split_interval) {
openSplitInterval(gpxItem, segment);
}
return false;
}

View file

@ -351,7 +351,6 @@ public class TrackMenuFragment extends ContextMenuScrollFragment implements Card
if (mapActivity != null && trackChartPoints != null) {
mapActivity.getMapLayers().getGpxLayer().setTrackChartPoints(trackChartPoints);
}
updateHeader();
startLocationUpdate();
}
@ -734,7 +733,7 @@ public class TrackMenuFragment extends ContextMenuScrollFragment implements Card
}
@Override
public void showOptionsPopupMenu(View view, final TrkSegment segment, final boolean confirmDeletion) {
public void showOptionsPopupMenu(View view, final TrkSegment segment, final boolean confirmDeletion, final GpxDisplayItem gpxItem) {
FragmentActivity activity = getActivity();
if (activity != null) {
IconPopupMenu optionsPopupMenu = new IconPopupMenu(activity, view.findViewById(R.id.overflow_menu));
@ -742,6 +741,11 @@ public class TrackMenuFragment extends ContextMenuScrollFragment implements Card
optionsPopupMenu.getMenuInflater().inflate(R.menu.track_segment_menu, menu);
menu.findItem(R.id.action_edit).setIcon(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_edit_dark));
menu.findItem(R.id.action_delete).setIcon(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_remove_dark));
if (getGpx().showCurrentTrack) {
menu.findItem(R.id.split_interval).setVisible(false);
} else {
menu.findItem(R.id.split_interval).setIcon(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_split_interval));
}
optionsPopupMenu.setOnMenuItemClickListener(new IconPopupMenu.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
@ -766,6 +770,8 @@ public class TrackMenuFragment extends ContextMenuScrollFragment implements Card
builder.show();
}
return true;
} else if (i == R.id.split_interval) {
openSplitInterval(gpxItem, segment);
}
return false;
}
@ -819,7 +825,7 @@ public class TrackMenuFragment extends ContextMenuScrollFragment implements Card
@Override
public void gpxSavingFinished(Exception errorMessage) {
if (selectedGpxFile != null) {
List<GpxDisplayGroup> groups = displayHelper.getDisplayGroups(new GpxDisplayItemType[] {GpxDisplayItemType.TRACK_SEGMENT});
List<GpxDisplayGroup> groups = displayHelper.getDisplayGroups(new GpxDisplayItemType[]{GpxDisplayItemType.TRACK_SEGMENT});
selectedGpxFile.setDisplayGroups(groups, app);
selectedGpxFile.processPoints(app);
}