forked from upstream-mirrors/OpenTracks
TrackStoppedActivity: added discard button option. Fixes #1267.
This commit is contained in:
committed by
Román Martínez
parent
28abe360cb
commit
ecd7405a8c
@@ -88,11 +88,14 @@ public abstract class AbstractTrackDeleteActivity extends AbstractActivity imple
|
|||||||
if (deleteStatus.isFinished() && trackDeleteServiceConnection != null) {
|
if (deleteStatus.isFinished() && trackDeleteServiceConnection != null) {
|
||||||
trackDeleteServiceConnection.unbind(this);
|
trackDeleteServiceConnection.unbind(this);
|
||||||
trackDeleteServiceConnection = null;
|
trackDeleteServiceConnection = null;
|
||||||
|
onDeleteFinished();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void onDeleteConfirmed();
|
protected abstract void onDeleteConfirmed();
|
||||||
|
|
||||||
|
protected abstract void onDeleteFinished();
|
||||||
|
|
||||||
protected abstract Track.Id getRecordingTrackId();
|
protected abstract Track.Id getRecordingTrackId();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -445,6 +445,11 @@ public class TrackListActivity extends AbstractTrackDeleteActivity implements Co
|
|||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDeleteFinished() {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
protected Track.Id getRecordingTrackId() {
|
protected Track.Id getRecordingTrackId() {
|
||||||
|
|||||||
@@ -244,6 +244,11 @@ public class TrackRecordedActivity extends AbstractTrackDeleteActivity implement
|
|||||||
runOnUiThread(this::finish);
|
runOnUiThread(this::finish);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDeleteFinished() {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the {@link TrackDataHub}.
|
* Gets the {@link TrackDataHub}.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -15,13 +15,14 @@ import de.dennisguse.opentracks.databinding.TrackStoppedBinding;
|
|||||||
import de.dennisguse.opentracks.fragments.ChooseActivityTypeDialogFragment;
|
import de.dennisguse.opentracks.fragments.ChooseActivityTypeDialogFragment;
|
||||||
import de.dennisguse.opentracks.services.TrackRecordingServiceConnection;
|
import de.dennisguse.opentracks.services.TrackRecordingServiceConnection;
|
||||||
import de.dennisguse.opentracks.settings.PreferencesUtils;
|
import de.dennisguse.opentracks.settings.PreferencesUtils;
|
||||||
|
import de.dennisguse.opentracks.ui.aggregatedStatistics.ConfirmDeleteDialogFragment;
|
||||||
import de.dennisguse.opentracks.util.ExportUtils;
|
import de.dennisguse.opentracks.util.ExportUtils;
|
||||||
import de.dennisguse.opentracks.util.IntentUtils;
|
import de.dennisguse.opentracks.util.IntentUtils;
|
||||||
import de.dennisguse.opentracks.util.StringUtils;
|
import de.dennisguse.opentracks.util.StringUtils;
|
||||||
import de.dennisguse.opentracks.util.TrackIconUtils;
|
import de.dennisguse.opentracks.util.TrackIconUtils;
|
||||||
import de.dennisguse.opentracks.util.TrackUtils;
|
import de.dennisguse.opentracks.util.TrackUtils;
|
||||||
|
|
||||||
public class TrackStoppedActivity extends AbstractActivity implements ChooseActivityTypeDialogFragment.ChooseActivityTypeCaller {
|
public class TrackStoppedActivity extends AbstractTrackDeleteActivity implements ChooseActivityTypeDialogFragment.ChooseActivityTypeCaller {
|
||||||
|
|
||||||
private static final String TAG = TrackStoppedActivity.class.getSimpleName();
|
private static final String TAG = TrackStoppedActivity.class.getSimpleName();
|
||||||
|
|
||||||
@@ -31,6 +32,8 @@ public class TrackStoppedActivity extends AbstractActivity implements ChooseActi
|
|||||||
|
|
||||||
private Track.Id trackId;
|
private Track.Id trackId;
|
||||||
|
|
||||||
|
private boolean isDiscarding = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@@ -94,13 +97,16 @@ public class TrackStoppedActivity extends AbstractActivity implements ChooseActi
|
|||||||
finish();
|
finish();
|
||||||
});
|
});
|
||||||
|
|
||||||
viewBinding.resumeButton.setOnClickListener(v -> {
|
viewBinding.resumeButton.setOnClickListener(v -> resumeTrackAndFinish());
|
||||||
resumeTrackAndFinish();
|
|
||||||
});
|
viewBinding.discardButton.setOnClickListener(v -> ConfirmDeleteDialogFragment.showDialog(getSupportFragmentManager(), trackId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
|
if (isDiscarding) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
super.onBackPressed();
|
super.onBackPressed();
|
||||||
resumeTrackAndFinish();
|
resumeTrackAndFinish();
|
||||||
}
|
}
|
||||||
@@ -134,4 +140,22 @@ public class TrackStoppedActivity extends AbstractActivity implements ChooseActi
|
|||||||
finish();
|
finish();
|
||||||
}).startAndBind(this);
|
}).startAndBind(this);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
|
protected void onDeleteConfirmed() {
|
||||||
|
isDiscarding = true;
|
||||||
|
viewBinding.loadingLayout.loadingText.setText(getString(R.string.track_discarding));
|
||||||
|
viewBinding.contentLinearLayout.setVisibility(View.GONE);
|
||||||
|
viewBinding.loadingLayout.loadingIndeterminate.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDeleteFinished() {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Track.Id getRecordingTrackId() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#000000"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/loading_indeterminate"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/loading_text"
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Headline5"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAlignment="center"
|
||||||
|
app:layout_constraintVertical_chainStyle="packed"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/loading_indicator"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
tools:text="Text" />
|
||||||
|
|
||||||
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
|
android:id="@+id/loading_indicator"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="16dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/loading_text"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:indeterminate="true" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -7,187 +7,219 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<ScrollView style="@style/ScrollView.WithBottomButtons">
|
<include
|
||||||
|
android:id="@+id/loading_layout"
|
||||||
|
layout="@layout/loading_indeterminate"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/content_linear_layout"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:orientation="vertical"
|
android:layout_height="match_parent"
|
||||||
android:padding="8dp">
|
android:orientation="vertical"
|
||||||
|
android:visibility="visible">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<ScrollView style="@style/ScrollView.WithBottomButtons">
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
style="?attr/textInputOutlinedStyle"
|
|
||||||
android:hint="@string/generic_name"
|
|
||||||
android:imeOptions="actionNext"
|
|
||||||
android:importantForAutofill="no"
|
|
||||||
android:layout_marginBottom="16dp">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/track_edit_name"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:inputType="textCapSentences"
|
|
||||||
android:selectAllOnFocus="true" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="vertical"
|
||||||
|
android:padding="8dp">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="?attr/textInputOutlinedExposedDropdownMenuStyle"
|
style="?attr/textInputOutlinedStyle"
|
||||||
|
android:hint="@string/generic_name"
|
||||||
android:imeOptions="actionNext"
|
android:imeOptions="actionNext"
|
||||||
android:importantForAutofill="no"
|
android:importantForAutofill="no"
|
||||||
android:layout_marginBottom="16dp">
|
android:layout_marginBottom="16dp">
|
||||||
|
|
||||||
<com.google.android.material.textfield.MaterialAutoCompleteTextView
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/track_edit_activity_type"
|
android:id="@+id/track_edit_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="8dp"
|
android:inputType="textCapSentences"
|
||||||
android:hint="@string/track_edit_activity_type_hint"
|
|
||||||
android:imeOptions="actionNext"
|
|
||||||
android:selectAllOnFocus="true" />
|
android:selectAllOnFocus="true" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<ImageView
|
<LinearLayout
|
||||||
android:id="@+id/track_edit_activity_type_icon"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_gravity="bottom"
|
|
||||||
tools:src="@drawable/ic_activity_bike_24dp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
style="?attr/textInputOutlinedStyle"
|
|
||||||
android:hint="@string/generic_description"
|
|
||||||
android:imeOptions="actionNext"
|
|
||||||
android:importantForAutofill="no"
|
|
||||||
android:layout_marginBottom="16dp">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/track_edit_description"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="textCapSentences"
|
android:orientation="horizontal">
|
||||||
android:selectAllOnFocus="true" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="?attr/textInputOutlinedExposedDropdownMenuStyle"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:importantForAutofill="no"
|
||||||
|
android:layout_marginBottom="16dp">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.MaterialAutoCompleteTextView
|
||||||
|
android:id="@+id/track_edit_activity_type"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:hint="@string/track_edit_activity_type_hint"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:selectAllOnFocus="true" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/track_edit_activity_type_icon"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
tools:src="@drawable/ic_activity_bike_24dp"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="?attr/textInputOutlinedStyle"
|
||||||
|
android:hint="@string/generic_description"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:importantForAutofill="no"
|
||||||
|
android:layout_marginBottom="16dp">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/track_edit_description"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textCapSentences"
|
||||||
|
android:selectAllOnFocus="true" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_percent="0.5" />
|
||||||
|
|
||||||
|
<!-- Time -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/time"
|
||||||
|
style="?attr/textAppearanceHeadline2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="04:54:36" />
|
||||||
|
|
||||||
|
<!-- Distance -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/distance"
|
||||||
|
style="?attr/textAppearanceHeadline3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/distance_unit"
|
||||||
|
app:layout_constraintHorizontal_chainStyle="packed"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/time"
|
||||||
|
tools:layout_editor_absoluteX="52dp"
|
||||||
|
tools:text="130" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/distance_unit"
|
||||||
|
style="@style/TextAppearance.OpenTracks.PrimaryUnit"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/distance"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/guideline"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/distance"
|
||||||
|
tools:text="km" />
|
||||||
|
|
||||||
|
<!-- Average moving speed -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/speed"
|
||||||
|
style="?attr/textAppearanceHeadline3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/speed_unit"
|
||||||
|
app:layout_constraintHorizontal_chainStyle="packed"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/guideline"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/time"
|
||||||
|
tools:text="26,5" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/speed_unit"
|
||||||
|
style="@style/TextAppearance.OpenTracks.PrimaryUnit"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/speed"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/speed"
|
||||||
|
tools:text="km/h" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
<LinearLayout style="@style/BottomButtonBar">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1">
|
android:padding="8dp">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Guideline
|
<androidx.constraintlayout.widget.Guideline
|
||||||
android:id="@+id/guideline"
|
android:id="@+id/buttons_guideline"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintGuide_percent="0.5" />
|
app:layout_constraintGuide_percent="0.5" />
|
||||||
|
|
||||||
<!-- Time -->
|
<ImageView
|
||||||
<TextView
|
android:id="@+id/discard_button"
|
||||||
android:id="@+id/time"
|
android:layout_width="32dp"
|
||||||
style="?attr/textAppearanceHeadline2"
|
android:layout_height="32dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_marginEnd="52dp"
|
||||||
android:layout_height="wrap_content"
|
android:contentDescription="@string/image_discard"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintEnd_toStartOf="@id/resume_button"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:text="04:54:36" />
|
app:srcCompat="@drawable/ic_delete_forever_24dp" />
|
||||||
|
|
||||||
<!-- Distance -->
|
<ImageView
|
||||||
<TextView
|
android:id="@+id/resume_button"
|
||||||
android:id="@+id/distance"
|
android:layout_width="64dp"
|
||||||
style="?attr/textAppearanceHeadline3"
|
android:layout_height="64dp"
|
||||||
android:layout_width="wrap_content"
|
android:contentDescription="@string/image_record"
|
||||||
android:layout_height="wrap_content"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/distance_unit"
|
app:layout_constraintEnd_toStartOf="@id/buttons_guideline"
|
||||||
app:layout_constraintHorizontal_chainStyle="packed"
|
app:layout_constraintStart_toEndOf="@id/buttons_guideline"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/time"
|
app:srcCompat="@drawable/ic_button_resume" />
|
||||||
tools:layout_editor_absoluteX="52dp"
|
|
||||||
tools:text="130" />
|
|
||||||
|
|
||||||
<TextView
|
<ImageView
|
||||||
android:id="@+id/distance_unit"
|
android:id="@+id/finish_button"
|
||||||
style="@style/TextAppearance.OpenTracks.PrimaryUnit"
|
android:layout_width="64dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="64dp"
|
||||||
android:layout_height="wrap_content"
|
android:contentDescription="@string/image_stop"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/distance"
|
android:layout_marginStart="36dp"
|
||||||
app:layout_constraintEnd_toStartOf="@id/guideline"
|
app:layout_constraintBottom_toBottomOf="@id/resume_button"
|
||||||
app:layout_constraintStart_toEndOf="@+id/distance"
|
app:layout_constraintStart_toEndOf="@id/resume_button"
|
||||||
tools:text="km" />
|
app:layout_constraintTop_toTopOf="@id/resume_button"
|
||||||
|
app:srcCompat="@drawable/ic_button_done" />
|
||||||
<!-- Average moving speed -->
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/speed"
|
|
||||||
style="?attr/textAppearanceHeadline3"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/speed_unit"
|
|
||||||
app:layout_constraintHorizontal_chainStyle="packed"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/guideline"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/time"
|
|
||||||
tools:text="26,5" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/speed_unit"
|
|
||||||
style="@style/TextAppearance.OpenTracks.PrimaryUnit"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/speed"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/speed"
|
|
||||||
tools:text="km/h" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
<LinearLayout style="@style/BottomButtonBar">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:padding="8dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/resume_button"
|
|
||||||
android:layout_width="64dp"
|
|
||||||
android:layout_height="64dp"
|
|
||||||
android:contentDescription="@string/image_record"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/finish_button"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:srcCompat="@drawable/ic_button_resume" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/finish_button"
|
|
||||||
android:layout_width="64dp"
|
|
||||||
android:layout_height="64dp"
|
|
||||||
android:contentDescription="@string/image_stop"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/resume_button"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/resume_button"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/resume_button"
|
|
||||||
app:srcCompat="@drawable/ic_button_done" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -259,6 +259,7 @@ limitations under the License.
|
|||||||
<string name="image_photo_marker">Photo marker</string>
|
<string name="image_photo_marker">Photo marker</string>
|
||||||
<string name="image_record">Record</string>
|
<string name="image_record">Record</string>
|
||||||
<string name="image_stop">Stop</string>
|
<string name="image_stop">Stop</string>
|
||||||
|
<string name="image_discard">Discard</string>
|
||||||
<string name="image_track">Track</string>
|
<string name="image_track">Track</string>
|
||||||
<!-- Import -->
|
<!-- Import -->
|
||||||
<string name="import_thread_interrupted">Thread interrupted</string>
|
<string name="import_thread_interrupted">Thread interrupted</string>
|
||||||
@@ -491,6 +492,7 @@ limitations under the License.
|
|||||||
<string name="track_delete_progress_message">Deleting…</string>
|
<string name="track_delete_progress_message">Deleting…</string>
|
||||||
<string name="track_delete_progress">%1$d/%2$d</string>
|
<string name="track_delete_progress">%1$d/%2$d</string>
|
||||||
<string name="track_delete_not_recording">This track cannot be deleted as it is currently recorded.</string>
|
<string name="track_delete_not_recording">This track cannot be deleted as it is currently recorded.</string>
|
||||||
|
<string name="track_discarding">Discarding Track</string>
|
||||||
<!-- Track Detail -->
|
<!-- Track Detail -->
|
||||||
<string name="track_detail_stats_tab">Stats</string>
|
<string name="track_detail_stats_tab">Stats</string>
|
||||||
<string name="track_detail_intervals_tab">Intervals</string>
|
<string name="track_detail_intervals_tab">Intervals</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user