UI refactoring with a Bottom App Bar.

Only one button to play/stop.
Stop Activity to edit track just recorded, resuming or finishing.
Logo color to FF6D00.
Fixes #1078 #437 #575 #1094.
This commit is contained in:
Román Ginés
2022-03-11 18:31:27 +01:00
committed by Román Martínez
parent a350077e5c
commit da62d26409
71 changed files with 2194 additions and 2024 deletions
+113 -31
View File
@@ -1,37 +1,119 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
enable-background="new 0 0 95.334 100"
height="100"
id="Ebene_1"
version="1.1"
viewBox="0 0 100 100"
width="100"
x="0px"
xmlns="http://www.w3.org/2000/svg"
y="0px"
xml:space="preserve"><metadata
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
enable-background="new 0 0 95.334 100"
height="100"
id="Ebene_1"
version="1.1"
viewBox="0 0 100 100"
width="100"
x="0px"
y="0px"
xml:space="preserve"
sodipodi:docname="LOGO.svg"
inkscape:version="1.0.2 (e86c870879, 2021-01-15)"><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1011"
id="namedview10"
showgrid="false"
inkscape:zoom="7.94"
inkscape:cx="50"
inkscape:cy="50"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="Ebene_1" /><metadata
id="metadata16"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata>
<defs id="defs14" />
<g id="g9"
transform="translate(-1.0593197,1.9067775)">
<linearGradient gradientUnits="userSpaceOnUse"
id="SVGID_1_"
x1="28.7554"
x2="82.789497"
y1="81.535202"
y2="9.2979002">
<stop style="stop-color:#FBB22F"
id="stop2"
offset="0" />
<stop style="stop-color:#F58820"
id="stop4"
offset="1" />
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata>
<defs
id="defs14"><linearGradient
inkscape:collect="always"
id="linearGradient862"><stop
style="stop-color:#ff6d00;stop-opacity:1;"
offset="0"
id="stop858" /><stop
style="stop-color:#ff6d00;stop-opacity:0;"
offset="1"
id="stop860" /></linearGradient><linearGradient
gradientUnits="userSpaceOnUse"
id="SVGID_1_"
x1="28.7554"
x2="82.789497"
y1="81.535202"
y2="9.2979002"
style="fill-opacity:1;fill:url(#linearGradient849)">
<stop
style="stop-color:#FBB22F;fill-opacity:1;fill:url(#linearGradient849)"
id="stop853"
offset="0" />
<stop
style="stop-color:#F58820;fill-opacity:1;fill:url(#linearGradient849)"
id="stop855"
offset="1" />
</linearGradient><linearGradient
inkscape:collect="always"
id="linearGradient847"><stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop843" /><stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop845" /></linearGradient><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient847"
id="linearGradient849"
x1="83.161415"
y1="8.9067831"
x2="10.194695"
y2="92.068085"
gradientUnits="userSpaceOnUse" /><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient862"
id="linearGradient866"
gradientUnits="userSpaceOnUse"
x1="62.43222"
y1="35.349697"
x2="9.7942638"
y2="93.02298" /></defs>
<g
id="g9"
transform="translate(-1.0593197,1.9067775)"
style="fill-opacity:1;fill:url(#linearGradient849)">
<linearGradient
gradientUnits="userSpaceOnUse"
id="SVGID_1_-3"
x1="28.7554"
x2="82.789497"
y1="81.535202"
y2="9.2979002"
style="fill-opacity:1;fill:url(#linearGradient849)">
<stop
style="stop-color:#FBB22F;fill-opacity:1;fill:url(#linearGradient849)"
id="stop2"
offset="0" />
<stop
style="stop-color:#F58820;fill-opacity:1;fill:url(#linearGradient849)"
id="stop4"
offset="1" />
</linearGradient>
<path style="fill:url(#SVGID_1_)"
d="M 83.548,10.927 C 84.255,8.511 83.102,7.649 80.985,9.01 L 11.146,53.921 c -2.117,1.361 -1.795,2.628 0.714,2.815 L 40.865,58.9 c 2.51,0.188 5.291,2.267 6.18,4.621 l 10.282,27.208 c 0.89,2.354 2.195,2.304 2.902,-0.111 z"
id="path7" />
<path
style="fill:url(#linearGradient866);fill-opacity:1"
d="M 83.548,10.927 C 84.255,8.511 83.102,7.649 80.985,9.01 L 11.146,53.921 c -2.117,1.361 -1.795,2.628 0.714,2.815 L 40.865,58.9 c 2.51,0.188 5.291,2.267 6.18,4.621 l 10.282,27.208 c 0.89,2.354 2.195,2.304 2.902,-0.111 z"
id="path7" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

+37
View File
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
enable-background="new 0 0 95.334 100"
height="100"
id="Ebene_1"
version="1.1"
viewBox="0 0 100 100"
width="100"
x="0px"
xmlns="http://www.w3.org/2000/svg"
y="0px"
xml:space="preserve"><metadata
id="metadata16"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata>
<defs id="defs14" />
<g id="g9"
transform="translate(-1.0593197,1.9067775)">
<linearGradient gradientUnits="userSpaceOnUse"
id="SVGID_1_"
x1="28.7554"
x2="82.789497"
y1="81.535202"
y2="9.2979002">
<stop style="stop-color:#FBB22F"
id="stop2"
offset="0" />
<stop style="stop-color:#F58820"
id="stop4"
offset="1" />
</linearGradient>
<path style="fill:url(#SVGID_1_)"
d="M 83.548,10.927 C 84.255,8.511 83.102,7.649 80.985,9.01 L 11.146,53.921 c -2.117,1.361 -1.795,2.628 0.714,2.815 L 40.865,58.9 c 2.51,0.188 5.291,2.267 6.18,4.621 l 10.282,27.208 c 0.89,2.354 2.195,2.304 2.902,-0.111 z"
id="path7" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

+67
View File
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="125"
id="svg2"
version="1.1"
viewBox="0 0 125 125"
width="125"
sodipodi:docname="ic_button_done.svg"
inkscape:version="1.0.2 (e86c870879, 2021-01-15)">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1011"
id="namedview9"
showgrid="false"
inkscape:zoom="2.2457711"
inkscape:cx="104.26334"
inkscape:cy="71.321036"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<defs
id="defs6" />
<circle
style="fill:none;fill-opacity:1;stroke:#ff6d00;stroke-width:5.03185;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
cx="62.5"
cy="62.5"
id="path12"
r="59.984074" />
<metadata
id="metadata8">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:title></dc:title>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<circle
style="fill:#ff6d00;fill-opacity:1;stroke:none;stroke-width:6.91728;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
cx="62.5"
cy="62.5"
id="path835"
r="50" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:6.2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 38.620483,63.865643 52.899055,78.144215 86.379516,44.663754"
id="path1000" />
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

+79
View File
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="125"
id="svg2"
version="1.1"
viewBox="0 0 125 125"
width="125"
sodipodi:docname="ic_button_resume.svg"
inkscape:version="1.0.2 (e86c870879, 2021-01-15)">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1011"
id="namedview9"
showgrid="false"
inkscape:zoom="3.176"
inkscape:cx="85.245821"
inkscape:cy="70.9649"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<defs
id="defs6" />
<circle
style="fill:none;fill-opacity:1;stroke:#ff6d00;stroke-width:5.03185;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
cx="62.5"
cy="62.5"
id="path12"
r="59.984074" />
<circle
style="fill:#ff6d00;fill-opacity:1;stroke:none;stroke-width:6.91728;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
cx="62.5"
cy="62.5"
id="path835"
r="50" />
<metadata
id="metadata8">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:title></dc:title>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<path
sodipodi:type="star"
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:6.67087;stroke-linecap:round;stroke-opacity:1"
id="path837"
sodipodi:sides="3"
sodipodi:cx="61.453945"
sodipodi:cy="62.5"
sodipodi:r1="26.146271"
sodipodi:r2="13.073136"
sodipodi:arg1="0"
sodipodi:arg2="1.0471976"
inkscape:flatsided="false"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 87.600216,62.5 67.990513,73.821668 48.38081,85.143335 l -10e-7,-22.643336 10e-7,-22.643334 19.609704,11.321667 z"
inkscape:transform-center-x="-6.5365678" />
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

@@ -78,17 +78,16 @@ public class EspressoDeleteTrackTest {
{
// TrackListActivity: start recording
ViewInteraction trackControllerRecordButton = onView(withId(R.id.controller_record));
ViewInteraction trackControllerRecordButton = onView(withId(R.id.track_list_fab_action));
trackControllerRecordButton.perform(click());
}
{
// TrackRecordingActivity
ViewInteraction trackControllerRecordButton = onView(withId(R.id.controller_record));
ViewInteraction trackControllerStopButton = onView(withId(R.id.controller_stop));
ViewInteraction trackControllerStopButton = onView(withId(R.id.track_recording_fab_action));
// wait; stay recording
trackControllerRecordButton.perform(waitFor(5000));
trackControllerStopButton.perform(waitFor(5000));
// stop;
trackControllerStopButton.perform(veryLongTouch(1600));
@@ -108,7 +107,7 @@ public class EspressoDeleteTrackTest {
allOf(withContentDescription("More options"),
childAtPosition(
childAtPosition(
withId(R.id.toolbar),
withId(R.id.bottom_app_bar),
2),
2),
isDisplayed()));
@@ -50,16 +50,15 @@ public class EspressoEditTrackRecordingTest {
public void espressoEditTrackRecordingTest() {
{
// TrackListActivity: start recording
ViewInteraction trackControllerRecordButton = onView(withId(R.id.controller_record));
trackControllerRecordButton.perform(click());
ViewInteraction fabRecordButton = onView(withId(R.id.track_list_fab_action));
fabRecordButton.perform(click());
}
{
// TrackRecordingActivity
ViewInteraction trackControllerRecordButton = onView(withId(R.id.controller_record));
ViewInteraction trackControllerStopButton = onView(withId(R.id.controller_stop));
ViewInteraction trackControllerStopButton = onView(withId(R.id.track_recording_fab_action));
// wait; stay recording
trackControllerRecordButton.perform(waitFor(15000));
trackControllerStopButton.perform(waitFor(15000));
// open menu
openContextualActionModeOverflowMenu();
@@ -88,37 +87,17 @@ public class EspressoEditTrackRecordingTest {
textInputEditText2.perform(closeSoftKeyboard());
// save edition
ViewInteraction appCompatButton = onView(
allOf(withId(R.id.track_edit_save),
childAtPosition(
childAtPosition(
withClassName(is("android.widget.LinearLayout")),
3),
1),
isDisplayed()));
ViewInteraction appCompatButton = onView(withId(R.id.track_edit_save));
appCompatButton.perform(click());
//pause
trackControllerRecordButton.perform(veryLongTouch(1600));
// wait; stay paused
trackControllerRecordButton.perform(waitFor(1000));
// resume
trackControllerRecordButton.perform(click());
// wait; stay recording
trackControllerRecordButton.perform(waitFor(1000));
// stop;
trackControllerStopButton.perform(veryLongTouch(1600));
// check track's name is "New Name"
ViewInteraction textView = onView(
allOf(withId(R.id.stats_name_value),
withParent(withParent(IsInstanceOf.instanceOf(android.widget.ScrollView.class))),
isDisplayed()));
textView.check(matches(withText("New Name")));
// it's on track stopped activity and there are two buttons
ViewInteraction resumeButton = onView(withId(R.id.resume_button));
resumeButton.check(matches(isDisplayed()));
ViewInteraction finishButton = onView(withId(R.id.finish_button));
finishButton.check(matches(isDisplayed()));
}
}
@@ -42,28 +42,27 @@ public class EspressoUITest {
public void record_pause_resume_stop() {
{
// TrackListActivity: start recording
ViewInteraction trackControllerRecordButton = onView(withId(R.id.controller_record));
ViewInteraction trackControllerRecordButton = onView(withId(R.id.track_list_fab_action));
trackControllerRecordButton.perform(click());
}
{
// TrackRecordingActivity
ViewInteraction trackControllerRecordButton = onView(withId(R.id.controller_record));
ViewInteraction trackControllerStopButton = onView(withId(R.id.controller_stop));
ViewInteraction trackControllerStopButton = onView(withId(R.id.track_recording_fab_action));
// wait; stay recording
trackControllerRecordButton.perform(waitFor(5000));
//pause
trackControllerRecordButton.perform(veryLongTouch(1600));
// wait; stay paused
trackControllerRecordButton.perform(waitFor(1000));
// resume
trackControllerRecordButton.perform(click());
// wait; stay recording
trackControllerRecordButton.perform(waitFor(1000));
// // wait; stay recording
// trackControllerRecordButton.perform(waitFor(5000));
//
// //pause
// trackControllerRecordButton.perform(veryLongTouch(1600));
//
// // wait; stay paused
// trackControllerRecordButton.perform(waitFor(1000));
//
// // resume
// trackControllerRecordButton.perform(click());
//
// // wait; stay recording
// trackControllerRecordButton.perform(waitFor(1000));
// stop;
trackControllerStopButton.perform(veryLongTouch(1600));
@@ -75,13 +74,13 @@ public class EspressoUITest {
public void record_move_through_tabs() {
{
// TrackListActivity: start recording
ViewInteraction trackControllerRecordButton = onView(withId(R.id.controller_record));
ViewInteraction trackControllerRecordButton = onView(withId(R.id.track_list_fab_action));
trackControllerRecordButton.perform(click());
}
{
// TrackRecordingActivity
ViewInteraction tabLayout = onView(withId(R.id.track_detail_activity_tablayout));
ViewInteraction trackControllerStopButton = onView(withId(R.id.controller_stop));
ViewInteraction trackControllerStopButton = onView(withId(R.id.track_recording_fab_action));
tabLayout.perform(selectTabAtIndex(1));
tabLayout.perform(waitFor(1000));
@@ -59,13 +59,13 @@ public class EspressoAggregatedFilterTest {
@Test
public void espressoAggregatedFilterTest() {
// open AggregatedStatisticsActivity through toolbar's menu item
onView(ViewMatchers.withId(R.id.toolbar)).check(matches(isDisplayed()));
onView(withId(R.id.toolbar)).check(matches(hasDescendant(withId(R.id.track_list_aggregated_stats))));
onView(ViewMatchers.withId(R.id.bottom_app_bar)).check(matches(isDisplayed()));
onView(withId(R.id.bottom_app_bar)).check(matches(hasDescendant(withId(R.id.track_list_aggregated_stats))));
onView(withId(R.id.track_list_aggregated_stats)).perform(click());
// open FilterDialogFragment through toolbar's menu item
onView(withId(R.id.toolbar)).check(matches(isDisplayed()));
onView(withId(R.id.toolbar)).check(matches(hasDescendant(withId(R.id.aggregated_statistics_filter))));
onView(withId(R.id.bottom_app_bar)).check(matches(isDisplayed()));
onView(withId(R.id.bottom_app_bar)).check(matches(hasDescendant(withId(R.id.aggregated_statistics_filter))));
onView(withId(R.id.aggregated_statistics_filter)).perform(click());
// check there's a checkbox with CATEGORY text
@@ -41,7 +41,7 @@ public class EspressoCustomLayoutTest {
@Test
public void customLayoutTest() {
// TrackListActivity: start recording
ViewInteraction trackControllerRecordButton = onView(ViewMatchers.withId(R.id.controller_record));
ViewInteraction trackControllerRecordButton = onView(ViewMatchers.withId(R.id.track_list_fab_action));
trackControllerRecordButton.perform(click());
// Get custom layout preferences and check all data fields are showed.
@@ -50,7 +50,7 @@ public class EspressoCustomLayoutTest {
onView(withId(R.id.stats_recycler_view)).check(new RecyclerViewItemCountAssertion((int) layout.getFields().stream().filter(DataField::isVisible).count()));
// stop recording
ViewInteraction trackControllerStopButton = onView(withId(R.id.controller_stop));
ViewInteraction trackControllerStopButton = onView(withId(R.id.track_recording_fab_action));
trackControllerStopButton.perform(veryLongTouch(1600));
}
+1
View File
@@ -324,6 +324,7 @@ limitations under the License.
</activity>
<activity android:name=".TrackRecordedActivity" />
<activity android:name=".TrackStoppedActivity" />
<activity
android:name=".TrackRecordingActivity"
@@ -24,6 +24,8 @@ public class AboutActivity extends AbstractActivity {
viewBinding.aboutTextVersionCode.setText(getString(R.string.about_version_code, SystemUtils.getAppVersionCode(this)));
viewBinding.aboutAppUrl.setText(getString(R.string.about_url, getString(R.string.app_web_url)));
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
ViewUtils.makeClickableLinks(findViewById(android.R.id.content));
}
@@ -19,9 +19,7 @@ package de.dennisguse.opentracks;
import android.os.Bundle;
import android.view.View;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import de.dennisguse.opentracks.services.announcement.VoiceAnnouncement;
@@ -38,9 +36,6 @@ public abstract class AbstractActivity extends AppCompatActivity {
setVolumeControlStream(VoiceAnnouncement.AUDIO_STREAM);
setContentView(getRootView());
Toolbar toolbar = findViewById(R.id.toolbar);
setupActionBarBack(toolbar);
}
@Override
@@ -50,12 +45,4 @@ public abstract class AbstractActivity extends AppCompatActivity {
}
protected abstract View getRootView();
protected void setupActionBarBack(@Nullable Toolbar toolbar) {
setSupportActionBar(toolbar);
if (toolbar != null) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
}
}
}
@@ -1,264 +0,0 @@
/*
* Copyright 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package de.dennisguse.opentracks;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.drawable.TransitionDrawable;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import de.dennisguse.opentracks.databinding.ControllerFragmentBinding;
import de.dennisguse.opentracks.services.RecordingData;
import de.dennisguse.opentracks.services.RecordingStatus;
import de.dennisguse.opentracks.services.TrackRecordingService;
import de.dennisguse.opentracks.services.TrackRecordingServiceConnection;
import de.dennisguse.opentracks.ui.util.ActivityUtils;
import de.dennisguse.opentracks.util.StringUtils;
/**
* Track controller for record, pause, resume, and stop.
*
* @author Jimmy Shih
*/
//TODO Move buttons into separate components
public class ControllerFragment extends Fragment implements View.OnTouchListener {
private static final String TAG = ControllerFragment.class.getSimpleName();
private Handler handlerUpdateTotalTime;
private Runnable buttonDelay;
private int buttonDelayDuration;
private ControllerFragmentBinding viewBinding;
private TransitionDrawable transition;
private TrackRecordingServiceConnection trackRecordingServiceConnection;
private RecordingStatus recordingStatus;
private RecordingData recordingData;
private final TrackRecordingServiceConnection.Callback bindChangedCallback = service -> {
service.getRecordingStatusObservable()
.observe(ControllerFragment.this, this::onRecordingStatusChanged);
service.getRecordingDataObservable()
.observe(ControllerFragment.this, this::onTotalTimeChanged);
};
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
buttonDelayDuration = getResources().getInteger(R.integer.buttonDelayMillis);
trackRecordingServiceConnection = new TrackRecordingServiceConnection(bindChangedCallback);
handlerUpdateTotalTime = new Handler();
recordingStatus = TrackRecordingService.STATUS_DEFAULT;
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
viewBinding = ControllerFragmentBinding.inflate(inflater, container, false);
viewBinding.controllerRecord.setOnTouchListener(this);
viewBinding.controllerRecord.setOnClickListener((view) -> {
if (buttonDelay != null || recordingStatus.isRecordingAndNotPaused()) {
return;
}
Callback callback = (Callback) getContext();
if (callback != null) {
callback.recordStart();
}
});
viewBinding.controllerStop.setOnTouchListener(this);
transition = (TransitionDrawable) viewBinding.controllerContainer.getBackground();
onRecordingStatusChanged(recordingStatus);
return viewBinding.getRoot();
}
@Override
public void onResume() {
super.onResume();
trackRecordingServiceConnection.startConnection(getContext());
}
@Override
public void onPause() {
super.onPause();
handlerUpdateTotalTime.removeCallbacksAndMessages(null);
}
@Override
public void onStop() {
super.onStop();
trackRecordingServiceConnection.unbind(getContext());
}
@Override
public void onDestroyView() {
super.onDestroyView();
viewBinding = null;
transition = null;
}
@Override
public void onDestroy() {
super.onDestroy();
trackRecordingServiceConnection = null;
handlerUpdateTotalTime = null;
recordingStatus = null;
}
//TODO Move into a separate object
@SuppressLint("ClickableViewAccessibility") //We do accessibility manually.
@Override
public boolean onTouch(final View view, MotionEvent event) {
if (!isResumed()) {
Log.w(TAG, "The UI is already gone, no need to update anything; seen on Android 7.1.2");
return false;
}
if (event.getAction() == MotionEvent.ACTION_MOVE) {
return false;
}
if (buttonDelay != null && event.getAction() == MotionEvent.ACTION_UP) {
handlerUpdateTotalTime.removeCallbacks(buttonDelay);
buttonDelay = null;
view.setPressed(false);
transition.resetTransition();
showStatusSetDefaultText();
return false;
}
//Trigger button pressed animation
view.setPressed(true);
//To pause a recording
if (viewBinding.controllerRecord.equals(view)
&& event.getAction() == MotionEvent.ACTION_DOWN
&& recordingStatus.isRecordingAndNotPaused()) {
transition.startTransition(buttonDelayDuration);
ActivityUtils.vibrate(getContext(), 150);
viewBinding.controllerStatus.setText(R.string.hold_to_pause);
buttonDelay = () -> {
view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
view.performClick();
Callback callback = (Callback) getContext();
if (callback != null) {
callback.recordPause();
}
transition.resetTransition();
ActivityUtils.vibrate(getContext(), 1000);
};
handlerUpdateTotalTime.postDelayed(buttonDelay, buttonDelayDuration);
return true;
}
//To stop a recording
if (viewBinding.controllerStop.equals(view)
&& event.getAction() == MotionEvent.ACTION_DOWN
&& recordingStatus.isRecording()) {
transition.startTransition(buttonDelayDuration);
ActivityUtils.vibrate(getContext(), 150);
viewBinding.controllerStatus.setText(R.string.hold_to_stop);
buttonDelay = () -> {
view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
Context context = getContext();
Callback callback = (Callback) context;
if (callback != null) {
callback.recordStop();
ActivityUtils.vibrate(context, 1000);
}
transition.resetTransition();
};
handlerUpdateTotalTime.postDelayed(buttonDelay, buttonDelayDuration);
return true;
}
return false;
}
public void hide() {
viewBinding.controllerContainer.setVisibility(View.GONE);
}
public void show() {
viewBinding.controllerContainer.setVisibility(View.VISIBLE);
}
private void showStatusSetDefaultText() {
viewBinding.controllerStatus.setText(recordingStatus.isPaused() ? R.string.generic_paused : R.string.generic_recording);
}
public interface Callback {
void recordStart();
void recordPause();
void recordStop();
}
private void onRecordingStatusChanged(RecordingStatus status) {
recordingStatus = status;
viewBinding.controllerRecord.setImageResource(recordingStatus.isRecordingAndNotPaused() ? R.drawable.ic_button_pause : R.drawable.button_record);
viewBinding.controllerRecord.setContentDescription(getContext().getString(recordingStatus.isRecordingAndNotPaused() ? R.string.image_pause : R.string.image_record));
viewBinding.controllerStop.setEnabled(recordingStatus.isRecording());
viewBinding.controllerStatus.setVisibility(recordingStatus.isRecording() ? View.VISIBLE : View.INVISIBLE);
if (recordingStatus.isRecording()) {
viewBinding.controllerStatus.setTextColor(getContext().getResources().getColor(recordingStatus.isPaused() ? android.R.color.white : R.color.recording_text));
showStatusSetDefaultText();
}
viewBinding.controllerTotalTime.setVisibility(recordingStatus.isRecording() ? View.VISIBLE : View.INVISIBLE);
}
private void onTotalTimeChanged(RecordingData recordingData) {
this.recordingData = recordingData;
viewBinding.controllerTotalTime.setText(StringUtils.formatElapsedTimeWithHour(this.recordingData.getTrackStatistics().getTotalTime()));
}
}
@@ -10,14 +10,18 @@ import de.dennisguse.opentracks.ui.util.ViewUtils;
public class HelpActivity extends AbstractActivity {
private HelpBinding helpBinding;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setSupportActionBar(helpBinding.bottomAppBarLayout.bottomAppBar);
ViewUtils.makeClickableLinks(findViewById(android.R.id.content));
}
@Override
protected View getRootView() {
return HelpBinding.inflate(getLayoutInflater()).getRoot();
helpBinding = HelpBinding.inflate(getLayoutInflater());
return helpBinding.getRoot();
}
}
@@ -71,17 +71,17 @@ public class TrackEditActivity extends AbstractActivity implements ChooseActivit
return;
}
viewBinding.trackEditName.setText(track.getName());
viewBinding.fields.trackEditName.setText(track.getName());
viewBinding.trackEditActivityType.setText(track.getCategory());
viewBinding.fields.trackEditActivityType.setText(track.getCategory());
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.activity_types, android.R.layout.simple_dropdown_item_1line);
viewBinding.trackEditActivityType.setAdapter(adapter);
viewBinding.trackEditActivityType.setOnItemClickListener((parent, view, position, id) -> setActivityTypeIcon(TrackIconUtils.getIconValue(this, (String) viewBinding.trackEditActivityType.getAdapter().getItem(position))));
viewBinding.trackEditActivityType.setOnFocusChangeListener((v, hasFocus) -> {
viewBinding.fields.trackEditActivityType.setAdapter(adapter);
viewBinding.fields.trackEditActivityType.setOnItemClickListener((parent, view, position, id) -> setActivityTypeIcon(TrackIconUtils.getIconValue(this, (String) viewBinding.fields.trackEditActivityType.getAdapter().getItem(position))));
viewBinding.fields.trackEditActivityType.setOnFocusChangeListener((v, hasFocus) -> {
if (!hasFocus) {
setActivityTypeIcon(TrackIconUtils.getIconValue(
TrackEditActivity.this, viewBinding.trackEditActivityType.getText().toString()));
TrackEditActivity.this, viewBinding.fields.trackEditActivityType.getText().toString()));
}
});
@@ -94,22 +94,23 @@ public class TrackEditActivity extends AbstractActivity implements ChooseActivit
}
setActivityTypeIcon(iconValue);
viewBinding.trackEditActivityTypeIcon.setOnClickListener(v -> ChooseActivityTypeDialogFragment.showDialog(getSupportFragmentManager(), viewBinding.trackEditActivityType.getText().toString()));
viewBinding.fields.trackEditActivityTypeIcon.setOnClickListener(v -> ChooseActivityTypeDialogFragment.showDialog(getSupportFragmentManager(), viewBinding.fields.trackEditActivityType.getText().toString()));
viewBinding.trackEditDescription.setText(track.getDescription());
viewBinding.fields.trackEditDescription.setText(track.getDescription());
viewBinding.trackEditSave.setOnClickListener(v -> {
TrackUtils.updateTrack(TrackEditActivity.this, track, viewBinding.trackEditName.getText().toString(),
viewBinding.trackEditActivityType.getText().toString(), viewBinding.trackEditDescription.getText().toString(),
TrackUtils.updateTrack(TrackEditActivity.this, track, viewBinding.fields.trackEditName.getText().toString(),
viewBinding.fields.trackEditActivityType.getText().toString(), viewBinding.fields.trackEditDescription.getText().toString(),
contentProviderUtils);
finish();
});
setTitle(R.string.menu_edit);
viewBinding.trackEditCancel.setOnClickListener(v -> finish());
viewBinding.trackEditCancel.setVisibility(View.VISIBLE);
}
viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(getString(R.string.menu_edit));
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
}
@Override
protected void onStart() {
@@ -137,12 +138,12 @@ public class TrackEditActivity extends AbstractActivity implements ChooseActivit
private void setActivityTypeIcon(String iconValue) {
this.iconValue = iconValue;
viewBinding.trackEditActivityTypeIcon.setImageResource(TrackIconUtils.getIconDrawable(iconValue));
viewBinding.fields.trackEditActivityTypeIcon.setImageResource(TrackIconUtils.getIconDrawable(iconValue));
}
@Override
public void onChooseActivityTypeDone(String value) {
setActivityTypeIcon(value);
viewBinding.trackEditActivityType.setText(getString(TrackIconUtils.getIconActivityType(value)));
viewBinding.fields.trackEditActivityType.setText(getString(TrackIconUtils.getIconActivityType(value)));
}
}
@@ -22,20 +22,23 @@ import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.database.Cursor;
import android.graphics.Color;
import android.graphics.drawable.AnimatedVectorDrawable;
import android.location.LocationManager;
import android.os.Bundle;
import android.os.Vibrator;
import android.provider.Settings;
import android.util.Pair;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.SearchView;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.cursoradapter.widget.ResourceCursorAdapter;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.CursorLoader;
@@ -76,7 +79,7 @@ import de.dennisguse.opentracks.util.TrackIconUtils;
*
* @author Leif Hendrik Wilden
*/
public class TrackListActivity extends AbstractTrackDeleteActivity implements ConfirmDeleteDialogFragment.ConfirmDeleteCaller, ControllerFragment.Callback {
public class TrackListActivity extends AbstractTrackDeleteActivity implements ConfirmDeleteDialogFragment.ConfirmDeleteCaller {
private static final String TAG = TrackListActivity.class.getSimpleName();
@@ -101,6 +104,9 @@ public class TrackListActivity extends AbstractTrackDeleteActivity implements Co
public void onPrepare(Menu menu, int[] positions, long[] trackIds, boolean showSelectAll) {
boolean isSingleSelection = trackIds.length == 1;
viewBinding.bottomAppBar.performHide(true);
viewBinding.trackListFabAction.setVisibility(View.INVISIBLE);
menu.findItem(R.id.list_context_menu_edit).setVisible(isSingleSelection);
menu.findItem(R.id.list_context_menu_select_all).setVisible(showSelectAll);
}
@@ -109,6 +115,12 @@ public class TrackListActivity extends AbstractTrackDeleteActivity implements Co
public boolean onClick(int itemId, int[] positions, long[] trackIds) {
return handleContextItem(itemId, trackIds);
}
@Override
public void onDestroy() {
viewBinding.trackListFabAction.setVisibility(View.VISIBLE);
viewBinding.bottomAppBar.performShow(true);
}
};
private final OnSharedPreferenceChangeListener sharedPreferenceChangeListener = (sharedPreferences, key) -> {
@@ -201,7 +213,7 @@ public class TrackListActivity extends AbstractTrackDeleteActivity implements Co
String category = icon != null && !icon.equals("") ? null : cursor.getString(categoryIndex);
String description = cursor.getString(descriptionIndex);
ListItemUtils.setListItem(TrackListActivity.this, view, isRecording, recordingStatus.isPaused(),
ListItemUtils.setListItem(TrackListActivity.this, view, isRecording,
iconId, R.string.image_track, name, totalTime, totalDistance, markerCount,
OffsetDateTime.ofInstant(Instant.ofEpochMilli(startTime), ZoneOffset.ofTotalSeconds(startTimeOffset)),
category, description, false);
@@ -210,13 +222,34 @@ public class TrackListActivity extends AbstractTrackDeleteActivity implements Co
viewBinding.trackList.setAdapter(resourceCursorAdapter);
ActivityUtils.configureListViewContextualMenu(viewBinding.trackList, contextualActionModeCallback);
loadData(getIntent());
}
viewBinding.trackListFabAction.setOnClickListener((view) -> {
if (recordingStatus.isRecording()) {
Toast.makeText(TrackListActivity.this, getString(R.string.hold_to_stop), Toast.LENGTH_LONG).show();
return;
}
@Override
protected void setupActionBarBack(Toolbar toolbar) {
setSupportActionBar(toolbar);
toolbar.setNavigationIcon(R.drawable.ic_logo_color_24dp);
// Not Recording -> Recording
updateGpsMenuItem(false, true);
Intent newIntent = IntentUtils.newIntent(TrackListActivity.this, TrackRecordingActivity.class);
startActivity(newIntent);
});
viewBinding.trackListFabAction.setOnLongClickListener((view) -> {
if (!recordingStatus.isRecording()) {
return false;
}
// Recording -> Stop
((Vibrator) getSystemService(Context.VIBRATOR_SERVICE)).vibrate(1000);
updateGpsMenuItem(false, false);
trackRecordingServiceConnection.stopRecording(TrackListActivity.this);
viewBinding.trackListFabAction.setImageResource(R.drawable.ic_baseline_record_24);
viewBinding.trackListFabAction.setBackgroundTintList(ContextCompat.getColorStateList(this, R.color.red_dark));
return true;
});
setSupportActionBar(viewBinding.bottomAppBar);
loadData(getIntent());
}
@Override
@@ -234,6 +267,9 @@ public class TrackListActivity extends AbstractTrackDeleteActivity implements Co
// Update UI
this.invalidateOptionsMenu();
LoaderManager.getInstance(this).restartLoader(0, null, loaderCallbacks);
// Float button
setFloatButton();
}
@Override
@@ -263,6 +299,13 @@ public class TrackListActivity extends AbstractTrackDeleteActivity implements Co
searchMenuItem = menu.findItem(R.id.track_list_search);
SearchView searchView = ActivityUtils.configureSearchWidget(this, searchMenuItem);
searchView.findViewById(R.id.search_edit_frame).setPadding(0, 0, 48, 0);
SearchView.SearchAutoComplete searchAutoComplete = searchView.findViewById(R.id.search_src_text);
searchAutoComplete.setHintTextColor(getResources().getColor(android.R.color.white));
searchAutoComplete.setTextColor(getResources().getColor(android.R.color.white));
searchView.setOnCloseListener(() -> {
searchView.clearFocus();
searchMenuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
@@ -515,38 +558,18 @@ public class TrackListActivity extends AbstractTrackDeleteActivity implements Co
}
}
@Override
public void recordStart() {
if (recordingStatus.getTrackId() == null) {
// Not recording -> Recording
updateGpsMenuItem(false, true);
Intent newIntent = IntentUtils.newIntent(TrackListActivity.this, TrackRecordingActivity.class);
startActivity(newIntent);
} else if (recordingStatus.isPaused()) {
// Paused -> Resume
updateGpsMenuItem(false, true);
trackRecordingServiceConnection.resumeTrack();
}
}
@Override
public void recordPause() {
updateGpsMenuItem(false, true);
trackRecordingServiceConnection.pauseTrack();
}
@Override
public void recordStop() {
updateGpsMenuItem(false, false);
trackRecordingServiceConnection.stopRecording(TrackListActivity.this);
}
public void onGpsStatusChanged(GpsStatusValue newStatus) {
gpsStatusValue = newStatus;
updateGpsMenuItem(true, recordingStatus.isRecording());
}
private void setFloatButton() {
viewBinding.trackListFabAction.setImageResource(recordingStatus.isRecording() ? R.drawable.ic_baseline_stop_24 : R.drawable.ic_baseline_record_24);
viewBinding.trackListFabAction.setBackgroundTintList(ContextCompat.getColorStateList(this, recordingStatus.isRecording() ? R.color.opentracks_secondary_color : R.color.red_dark));
}
private void onRecordingStatusChanged(RecordingStatus status) {
recordingStatus = status;
setFloatButton();
}
}
@@ -102,6 +102,11 @@ public class TrackRecordedActivity extends AbstractTrackDeleteActivity implement
trackRecordingServiceConnection = new TrackRecordingServiceConnection(bindCallback);
Track track = contentProviderUtils.getTrack(trackId);
viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(track != null ? track.getName() : "");
viewBinding.bottomAppBarLayout.bottomAppBar.replaceMenu(R.menu.track_detail);
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
postponeEnterTransition();
}
@@ -162,8 +167,6 @@ public class TrackRecordedActivity extends AbstractTrackDeleteActivity implement
public boolean onPrepareOptionsMenu(Menu menu) {
menu.findItem(R.id.track_detail_markers).setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menu.findItem(R.id.track_detail_resume_track).setVisible(!recordingStatus.isRecording());
Track track = contentProviderUtils.getTrack(trackId);
setTitle(track != null ? track.getName() : "");
return super.onPrepareOptionsMenu(menu);
}
@@ -246,7 +249,7 @@ public class TrackRecordedActivity extends AbstractTrackDeleteActivity implement
private void handleIntent(Intent intent) {
trackId = intent.getParcelableExtra(EXTRA_TRACK_ID);
if (trackId == null) {
Log.e(TAG, "TrackDetailActivity needs EXTRA_TRACK_ID.");
Log.e(TAG, TrackRecordedActivity.class.getSimpleName() + " needs EXTRA_TRACK_ID.");
finish();
}
}
@@ -2,10 +2,12 @@ package de.dennisguse.opentracks;
import android.Manifest;
import android.app.AlertDialog;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Build;
import android.os.Bundle;
import android.os.Vibrator;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
@@ -16,6 +18,7 @@ import android.widget.Toast;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.viewpager2.adapter.FragmentStateAdapter;
@@ -56,7 +59,7 @@ import de.dennisguse.opentracks.util.TrackUtils;
*/
//NOTE: This activity does NOT react to preference changes of R.string.recording_track_id_key.
//This mode of communication should be removed anyhow.
public class TrackRecordingActivity extends AbstractActivity implements ChooseActivityTypeDialogFragment.ChooseActivityTypeCaller, TrackDataHubInterface, ControllerFragment.Callback {
public class TrackRecordingActivity extends AbstractActivity implements ChooseActivityTypeDialogFragment.ChooseActivityTypeCaller, TrackDataHubInterface {
public static final String EXTRA_TRACK_ID = "track_id";
@@ -116,9 +119,6 @@ public class TrackRecordingActivity extends AbstractActivity implements ChooseAc
runOnUiThread(TrackRecordingActivity.this::invalidateOptionsMenu); //TODO Should not be necessary
};
private MenuItem insertMarkerMenuItem;
private MenuItem markerListMenuItem;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -148,6 +148,26 @@ public class TrackRecordingActivity extends AbstractActivity implements ChooseAc
}
requestGPSPermissions();
viewBinding.trackRecordingFabAction.setImageResource(R.drawable.ic_baseline_stop_24);
viewBinding.trackRecordingFabAction.setBackgroundTintList(ContextCompat.getColorStateList(this, R.color.opentracks_secondary_color));
viewBinding.trackRecordingFabAction.setBackgroundColor(getResources().getColor(R.color.opentracks_secondary_color));
viewBinding.trackRecordingFabAction.setOnLongClickListener((view) -> {
((Vibrator) getSystemService(Context.VIBRATOR_SERVICE)).vibrate(1000);
trackRecordingServiceConnection.stopRecording(TrackRecordingActivity.this);
Intent newIntent = IntentUtils.newIntent(TrackRecordingActivity.this, TrackStoppedActivity.class)
.putExtra(TrackStoppedActivity.EXTRA_TRACK_ID, trackId);
startActivity(newIntent);
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
finish();
return true;
});
viewBinding.trackRecordingFabAction.setOnClickListener((view) -> {
Toast.makeText(TrackRecordingActivity.this, getString(R.string.hold_to_stop), Toast.LENGTH_LONG).show();
});
viewBinding.bottomAppBar.setNavigationIcon(R.drawable.ic_baseline_arrow_back_24);
setSupportActionBar(viewBinding.bottomAppBar);
}
@Override
@@ -247,19 +267,9 @@ public class TrackRecordingActivity extends AbstractActivity implements ChooseAc
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.track_record, menu);
insertMarkerMenuItem = menu.findItem(R.id.track_detail_insert_marker);
markerListMenuItem = menu.findItem(R.id.track_detail_markers);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
updateMenuItems(recordingStatus.isPaused());
return super.onPrepareOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == R.id.track_detail_menu_show_on_map) {
@@ -315,15 +325,6 @@ public class TrackRecordingActivity extends AbstractActivity implements ChooseAc
return trackDataHub;
}
/**
* Updates the menu items.
*/
private void updateMenuItems(boolean isPaused) {
insertMarkerMenuItem.setVisible(!isPaused);
markerListMenuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
setTitle(getString(isPaused ? R.string.generic_paused : R.string.generic_recording));
}
@Override
public void onChooseActivityTypeDone(String iconValue) {
Track track = contentProviderUtils.getTrack(trackId);
@@ -331,29 +332,6 @@ public class TrackRecordingActivity extends AbstractActivity implements ChooseAc
TrackUtils.updateTrack(this, track, null, category, null, contentProviderUtils);
}
@Override
public void recordStart() {
updateMenuItems(false);
trackRecordingServiceConnection.resumeTrack();
}
@Override
public void recordPause() {
updateMenuItems(true);
trackRecordingServiceConnection.pauseTrack();
}
@Override
public void recordStop() {
trackRecordingServiceConnection.stopRecording(TrackRecordingActivity.this);
Intent newIntent = IntentUtils.newIntent(TrackRecordingActivity.this, TrackRecordedActivity.class)
.putExtra(TrackRecordedActivity.EXTRA_TRACK_ID, trackId);
startActivity(newIntent);
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
updateMenuItems(true);
finish();
}
private class CustomFragmentPagerAdapter extends FragmentStateAdapter {
public CustomFragmentPagerAdapter(@NonNull FragmentActivity fa) {
@@ -0,0 +1,131 @@
package de.dennisguse.opentracks;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.util.Pair;
import android.view.View;
import android.widget.ArrayAdapter;
import de.dennisguse.opentracks.data.ContentProviderUtils;
import de.dennisguse.opentracks.data.models.DistanceFormatter;
import de.dennisguse.opentracks.data.models.SpeedFormatter;
import de.dennisguse.opentracks.data.models.Track;
import de.dennisguse.opentracks.databinding.TrackStoppedBinding;
import de.dennisguse.opentracks.fragments.ChooseActivityTypeDialogFragment;
import de.dennisguse.opentracks.settings.PreferencesUtils;
import de.dennisguse.opentracks.util.ExportUtils;
import de.dennisguse.opentracks.util.IntentUtils;
import de.dennisguse.opentracks.util.StringUtils;
import de.dennisguse.opentracks.util.TrackIconUtils;
import de.dennisguse.opentracks.util.TrackUtils;
public class TrackStoppedActivity extends AbstractActivity implements ChooseActivityTypeDialogFragment.ChooseActivityTypeCaller {
private static final String TAG = TrackStoppedActivity.class.getSimpleName();
public static final String EXTRA_TRACK_ID = "track_id";
private TrackStoppedBinding viewBinding;
private Track.Id trackId;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
trackId = getIntent().getParcelableExtra(EXTRA_TRACK_ID);
if (trackId == null) {
Log.e(TAG, "TrackStoppedActivity needs EXTRA_TRACK_ID.");
finish();
}
ContentProviderUtils contentProviderUtils = new ContentProviderUtils(this);
Track track = contentProviderUtils.getTrack(trackId);
viewBinding.fields.trackEditName.setText(track.getName());
viewBinding.fields.trackEditActivityType.setText(track.getCategory());
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.activity_types, android.R.layout.simple_dropdown_item_1line);
viewBinding.fields.trackEditActivityType.setAdapter(adapter);
viewBinding.fields.trackEditActivityType.setOnItemClickListener((parent, view, position, id) -> setActivityTypeIcon(TrackIconUtils.getIconValue(this, (String) viewBinding.fields.trackEditActivityType.getAdapter().getItem(position))));
viewBinding.fields.trackEditActivityType.setOnFocusChangeListener((v, hasFocus) -> {
if (!hasFocus) {
setActivityTypeIcon(TrackIconUtils.getIconValue(
TrackStoppedActivity.this, viewBinding.fields.trackEditActivityType.getText().toString()));
}
});
String iconValue = track.getIcon();
setActivityTypeIcon(iconValue);
viewBinding.fields.trackEditActivityTypeIcon.setOnClickListener(v -> ChooseActivityTypeDialogFragment.showDialog(getSupportFragmentManager(), viewBinding.fields.trackEditActivityType.getText().toString()));
viewBinding.fields.trackEditDescription.setText(track.getDescription());
viewBinding.time.setText(StringUtils.formatElapsedTime(track.getTrackStatistics().getMovingTime()));
{
Pair<String, String> parts = SpeedFormatter.Builder()
.setUnit(PreferencesUtils.getUnitSystem())
.setReportSpeedOrPace(PreferencesUtils.isReportSpeed(track.getCategory()))
.build(this)
.getSpeedParts(track.getTrackStatistics().getAverageMovingSpeed());
viewBinding.speed.setText(parts.first);
viewBinding.speedUnit.setText(parts.second);
}
{
Pair<String, String> parts = DistanceFormatter.Builder()
.setUnit(PreferencesUtils.getUnitSystem())
.build(this)
.getDistanceParts(track.getTrackStatistics().getTotalDistance());
viewBinding.distance.setText(parts.first);
viewBinding.distanceUnit.setText(parts.second);
}
viewBinding.finishButton.setOnClickListener(v -> {
TrackUtils.updateTrack(TrackStoppedActivity.this, track, viewBinding.fields.trackEditName.getText().toString(),
viewBinding.fields.trackEditActivityType.getText().toString(), viewBinding.fields.trackEditDescription.getText().toString(),
contentProviderUtils);
ExportUtils.postWorkoutExport(this, trackId);
finish();
});
viewBinding.resumeButton.setOnClickListener(v -> {
resume();
finish();
});
}
@Override
public void onBackPressed() {
super.onBackPressed();
resume();
finish();
}
@Override
protected View getRootView() {
viewBinding = TrackStoppedBinding.inflate(getLayoutInflater());
return viewBinding.getRoot();
}
private void setActivityTypeIcon(String iconValue) {
viewBinding.fields.trackEditActivityTypeIcon.setImageResource(TrackIconUtils.getIconDrawable(iconValue));
}
@Override
public void onChooseActivityTypeDone(String iconValue) {
setActivityTypeIcon(iconValue);
viewBinding.fields.trackEditActivityType.setText(getString(TrackIconUtils.getIconActivityType(iconValue)));
}
private void resume() {
Intent newIntent = IntentUtils.newIntent(TrackStoppedActivity.this, TrackRecordingActivity.class)
.putExtra(TrackRecordingActivity.EXTRA_TRACK_ID, trackId);
startActivity(newIntent);
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}
}
@@ -37,7 +37,6 @@ import de.dennisguse.opentracks.data.ContentProviderUtils;
import de.dennisguse.opentracks.data.models.Track;
import de.dennisguse.opentracks.data.tables.TracksColumns;
import de.dennisguse.opentracks.databinding.ExportActivityBinding;
import de.dennisguse.opentracks.databinding.ToolbarBinding;
import de.dennisguse.opentracks.io.file.ErrorListDialog;
import de.dennisguse.opentracks.io.file.TrackFileFormat;
import de.dennisguse.opentracks.util.ExportUtils;
@@ -135,7 +134,6 @@ public class ExportActivity extends FragmentActivity implements ExportServiceRes
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
viewBinding = ExportActivityBinding.inflate(getLayoutInflater());
ToolbarBinding mergedBinding = ToolbarBinding.bind(viewBinding.getRoot());
setContentView(viewBinding.getRoot());
directoryUri = getIntent().getParcelableExtra(EXTRA_DIRECTORY_URI_KEY);
@@ -146,8 +144,6 @@ public class ExportActivity extends FragmentActivity implements ExportServiceRes
DocumentFile documentFile = DocumentFile.fromTreeUri(this, directoryUri);
String directoryDisplayName = FileUtils.getPath(documentFile);
mergedBinding.toolbar.setTitle(getString(R.string.export_progress_message, directoryDisplayName));
resultReceiver = new ExportServiceResultReceiver(new Handler(), this);
if (savedInstanceState == null) {
@@ -170,6 +166,9 @@ public class ExportActivity extends FragmentActivity implements ExportServiceRes
setProgress();
initExport(getTotalDone());
}
viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(getString(R.string.export_progress_message, directoryDisplayName));
viewBinding.bottomAppBarLayout.bottomAppBar.setNavigationIcon(R.drawable.ic_logo_color_24dp);
}
@Override
@@ -25,7 +25,6 @@ import android.view.View;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.documentfile.provider.DocumentFile;
import androidx.fragment.app.FragmentActivity;
@@ -71,8 +70,6 @@ public class ImportActivity extends FragmentActivity {
viewBinding = ImportActivityBinding.inflate(getLayoutInflater());
setContentView(viewBinding.getRoot());
Toolbar toolbar = findViewById(R.id.toolbar);
final Intent intent = getIntent();
final ClipData intentClipData = intent.getClipData();
@@ -106,9 +103,6 @@ public class ImportActivity extends FragmentActivity {
documentFiles = documentUris.stream().map(it -> DocumentFile.fromSingleUri(this, it)).collect(Collectors.toList());
}
//Works for a directory, but we might have received multiple files via SEND_MULTIPLE.
toolbar.setTitle(getString(R.string.import_progress_message, documentFiles.get(0).getName()));
initViews();
viewModel = new ViewModelProvider(this).get(ImportViewModel.class);
@@ -116,6 +110,10 @@ public class ImportActivity extends FragmentActivity {
summary = data;
setProgress();
});
//Works for a directory, but we might have received multiple files via SEND_MULTIPLE.
viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(getString(R.string.import_progress_message, documentFiles.get(0).getName()));
viewBinding.bottomAppBarLayout.bottomAppBar.setNavigationIcon(R.drawable.ic_logo_color_24dp);
}
@Override
@@ -39,7 +39,6 @@ import de.dennisguse.opentracks.services.announcement.VoiceAnnouncementManager;
import de.dennisguse.opentracks.services.handlers.EGM2008CorrectionManager;
import de.dennisguse.opentracks.services.handlers.GpsStatusValue;
import de.dennisguse.opentracks.services.handlers.TrackPointCreator;
import de.dennisguse.opentracks.util.ExportUtils;
import de.dennisguse.opentracks.util.SystemUtils;
public class TrackRecordingService extends Service implements TrackPointCreator.Callback {
@@ -235,8 +234,6 @@ public class TrackRecordingService extends Service implements TrackPointCreator.
endRecording(true);
ExportUtils.postWorkoutExport(this, trackId);
stopSelf();
}
@@ -68,12 +68,6 @@ public class MainSettingsFragment extends PreferenceFragmentCompat {
});
}
@Override
public void onStart() {
super.onStart();
((SettingsActivity) getActivity()).getSupportActionBar().setTitle(R.string.menu_settings);
}
@Override
public void onResume() {
super.onResume();
@@ -10,6 +10,8 @@ import androidx.preference.PreferenceFragmentCompat;
import de.dennisguse.opentracks.AbstractActivity;
import de.dennisguse.opentracks.R;
import de.dennisguse.opentracks.databinding.SettingsBinding;
import de.dennisguse.opentracks.databinding.TrackRecordedBinding;
import de.dennisguse.opentracks.fragments.ChooseActivityTypeDialogFragment;
public class SettingsActivity extends AbstractActivity implements ChooseActivityTypeDialogFragment.ChooseActivityTypeCaller {
@@ -21,6 +23,8 @@ public class SettingsActivity extends AbstractActivity implements ChooseActivity
private PreferenceFragmentCompat fragment = null;
private SettingsBinding viewBinding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -37,6 +41,9 @@ public class SettingsActivity extends AbstractActivity implements ChooseActivity
fragment = new MainSettingsFragment();
}
viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(getString(R.string.menu_settings));
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
getSupportFragmentManager().beginTransaction().replace(R.id.settings_fragment, fragment).commit();
}
@@ -66,7 +73,8 @@ public class SettingsActivity extends AbstractActivity implements ChooseActivity
@Override
protected View getRootView() {
return getLayoutInflater().inflate(R.layout.settings, null);
viewBinding = SettingsBinding.inflate(getLayoutInflater());
return viewBinding.getRoot();
}
private PreferenceFragmentCompat getPreferenceScreen(String key) {
@@ -6,7 +6,6 @@ import android.widget.ScrollView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.LinearLayoutManager;
@@ -15,12 +14,12 @@ import androidx.recyclerview.widget.RecyclerView;
import java.util.stream.IntStream;
import de.dennisguse.opentracks.AbstractActivity;
import de.dennisguse.opentracks.ui.util.ArrayAdapterFilterDisabled;
import de.dennisguse.opentracks.R;
import de.dennisguse.opentracks.databinding.ActivitySettingsCustomLayoutBinding;
import de.dennisguse.opentracks.ui.customRecordingLayout.DataField;
import de.dennisguse.opentracks.ui.customRecordingLayout.Layout;
import de.dennisguse.opentracks.ui.customRecordingLayout.SettingsCustomLayoutEditAdapter;
import de.dennisguse.opentracks.ui.util.ArrayAdapterFilterDisabled;
import de.dennisguse.opentracks.util.StatisticsUtils;
public class SettingsCustomLayoutEditActivity extends AbstractActivity implements SettingsCustomLayoutEditAdapter.SettingsCustomLayoutItemClickListener {
@@ -97,7 +96,8 @@ public class SettingsCustomLayoutEditActivity extends AbstractActivity implement
recyclerViewNotVisible.setLayoutManager(new LinearLayoutManager(this));
recyclerViewNotVisible.setAdapter(adapterFieldsHidden);
setTitle(profile);
viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(profile);
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
}
@Override
@@ -117,12 +117,6 @@ public class SettingsCustomLayoutEditActivity extends AbstractActivity implement
layoutFieldsVisible = null;
}
@Override
protected void setupActionBarBack(Toolbar toolbar) {
super.setupActionBarBack(toolbar);
toolbar.setTitle(R.string.menu_settings);
}
@Override
protected View getRootView() {
viewBinding = ActivitySettingsCustomLayoutBinding.inflate(getLayoutInflater());
@@ -40,8 +40,6 @@ public class SettingsCustomLayoutListActivity extends AbstractActivity implement
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(getString(R.string.custom_layout_list_title));
adapter = new SettingsCustomLayoutListAdapter(this, this);
recyclerView = viewBinding.recyclerView;
recyclerView.setLayoutManager(new LinearLayoutManager(this));
@@ -114,6 +112,9 @@ public class SettingsCustomLayoutListActivity extends AbstractActivity implement
ItemTouchHelper itemTouchhelper = new ItemTouchHelper(recyclerViewSwipeDeleteCallback);
itemTouchhelper.attachToRecyclerView(recyclerView);
viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(getString(R.string.custom_layout_list_title));
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
}
@Override
@@ -60,6 +60,9 @@ public class AggregatedStatisticsActivity extends AbstractActivity implements Fi
}
adapter.notifyDataSetChanged();
});
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(getString(R.string.menu_aggregated_statistics));
}
@Override
@@ -105,7 +105,7 @@ public class MarkerDetailActivity extends AbstractActivity implements DeleteMark
@Override
public void onPageSelected(int position) {
setTitle(markerAdapter.getPageTitle(position));
viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(markerAdapter.getPageTitle(position));
}
@Override
@@ -113,6 +113,8 @@ public class MarkerDetailActivity extends AbstractActivity implements DeleteMark
}
});
viewBinding.makerDetailActivityViewPager.setCurrentItem(markerIndex == -1 ? 0 : markerIndex);
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
}
@Override
@@ -101,7 +101,7 @@ public class MarkerEditActivity extends AbstractActivity {
});
boolean isNewMarker = markerId == null;
setTitle(isNewMarker ? R.string.menu_insert_marker : R.string.menu_edit);
viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(getString(isNewMarker ? R.string.menu_insert_marker : R.string.menu_edit));
viewBinding.markerEditDone.setText(isNewMarker ? R.string.generic_add : R.string.generic_save);
viewBinding.markerEditDone.setOnClickListener(v -> {
viewModel.onDone(viewBinding.markerEditName.getText().toString(),
@@ -150,6 +150,8 @@ public class MarkerEditActivity extends AbstractActivity {
viewBinding.markerEditDescription.getText().toString());
}
});
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
}
@Override
@@ -80,6 +80,8 @@ public class MarkerListActivity extends AbstractActivity implements DeleteMarker
public void onPrepare(Menu menu, int[] positions, long[] ids, boolean showSelectAll) {
boolean isSingleSelection = ids.length == 1;
viewBinding.bottomAppBarLayout.bottomAppBar.performHide(true);
menu.findItem(R.id.list_context_menu_show_on_map).setVisible(isSingleSelection);
menu.findItem(R.id.list_context_menu_edit).setVisible(isSingleSelection);
menu.findItem(R.id.list_context_menu_delete).setVisible(true);
@@ -92,6 +94,11 @@ public class MarkerListActivity extends AbstractActivity implements DeleteMarker
public boolean onClick(int itemId, int[] positions, long[] ids) {
return handleContextItem(itemId, ids);
}
@Override
public void onDestroy() {
viewBinding.bottomAppBarLayout.bottomAppBar.performShow(true);
}
};
private MenuItem insertMarkerMenuItem;
private MenuItem searchMenuItem;
@@ -121,6 +128,8 @@ public class MarkerListActivity extends AbstractActivity implements DeleteMarker
ActivityUtils.configureListViewContextualMenu(viewBinding.markerList, contextualActionModeCallback);
trackRecordingServiceConnection = new TrackRecordingServiceConnection(bindCallback);
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
}
@Override
@@ -301,9 +310,9 @@ public class MarkerListActivity extends AbstractActivity implements DeleteMarker
this.searchQuery = searchQuery;
restart();
if (searchQuery != null) {
setTitle(searchQuery);
viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(searchQuery);
} else {
setTitle(R.string.menu_markers);
viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(getString(R.string.menu_markers));
}
}
@@ -105,7 +105,7 @@ public class MarkerResourceCursorAdapter extends ResourceCursorAdapter implement
ContentProviderUtils contentProviderUtils = new ContentProviderUtils(context);
Track track = contentProviderUtils.getTrack(new Track.Id(trackId));
ListItemUtils.setListItem(activity, view, false, true, iconId, R.string.image_marker, name, null, null, 0,
ListItemUtils.setListItem(activity, view, false, iconId, R.string.image_marker, name, null, null, 0,
OffsetDateTime.ofInstant(Instant.ofEpochMilli(time), track.getZoneOffset()), category, description, hasPhoto);
}
@@ -45,7 +45,7 @@ public class ActivityUtils {
@Override
public void onDestroyActionMode(ActionMode mode) {
// Do nothing
contextualActionModeCallback.onDestroy();
}
@Override
@@ -127,5 +127,10 @@ public class ActivityUtils {
* @param ids the selected items' ids, if available
*/
boolean onClick(int itemId, int[] positions, long[] ids);
/**
* Invoked when contextual action mode is destroyed.
*/
void onDestroy();
}
}
@@ -44,7 +44,6 @@ public class ListItemUtils {
* @param context the context
* @param view the list item view
* @param isRecording true if recording
* @param isPaused true if paused
* @param iconId the icon id
* @param iconContentDescriptionId the icon content description id
* @param name the name value
@@ -56,11 +55,11 @@ public class ListItemUtils {
* @param description the description value
* @param hasPhoto true if this list item has photo
*/
public static void setListItem(Context context, View view, boolean isRecording, boolean isPaused, int iconId, int iconContentDescriptionId, String name, String totalTime, String totalDistance, int markerCount, OffsetDateTime offsetDateTime, String category, String description, boolean hasPhoto) {
public static void setListItem(Context context, View view, boolean isRecording, int iconId, int iconContentDescriptionId, String name, String totalTime, String totalDistance, int markerCount, OffsetDateTime offsetDateTime, String category, String description, boolean hasPhoto) {
// Set icon
if (isRecording) {
iconId = isPaused ? R.drawable.ic_track_paused : R.drawable.ic_track_recording;
iconContentDescriptionId = isPaused ? R.string.image_pause : R.string.image_record;
iconId = R.drawable.ic_track_recording;
iconContentDescriptionId = R.string.image_record;
}
ImageView iconImageView = view.findViewById(R.id.list_item_icon);
@@ -75,7 +74,7 @@ public class ListItemUtils {
TextView timeDistanceTextView = view.findViewById(R.id.list_item_time_distance);
String timeDistanceText;
if (isRecording) {
timeDistanceText = context.getString(isPaused ? R.string.generic_paused : R.string.generic_recording);
timeDistanceText = context.getString(R.string.generic_recording);
} else {
// Match list_item_time_distance in list_item.xml
timeDistanceText = getTimeDistance(totalTime, totalDistance);
-19
View File
@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2013 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_button_record_pressed" android:state_pressed="true" />
<item android:drawable="@drawable/ic_button_record" />
</selector>
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_button_stop_disabled" android:state_enabled="false" />
<item android:drawable="@drawable/ic_button_stop_pressed" android:state_pressed="true" />
<item android:drawable="@drawable/ic_button_stop" />
</selector>
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<transition xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The drawables used here can be solid colors, gradients, shapes, images, etc. -->
<item android:drawable="@color/track_controller_background_normal" />
<item android:drawable="@color/track_controller_background_activated" />
</transition>
@@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal"
android:autoMirrored="true">
<path
android:fillColor="@android:color/white"
android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
</vector>
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,12m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"/>
</vector>
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M6,6h12v12H6z"/>
</vector>
+23
View File
@@ -0,0 +1,23 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="125dp"
android:height="125dp"
android:viewportWidth="125"
android:viewportHeight="125">
<path
android:pathData="M62.5,62.5m-59.984,0a59.984,59.984 0,1 1,119.968 0a59.984,59.984 0,1 1,-119.968 0"
android:strokeWidth="5.03185"
android:fillColor="#00000000"
android:strokeColor="#ff6d00"/>
<path
android:pathData="M62.5,62.5m-50,0a50,50 0,1 1,100 0a50,50 0,1 1,-100 0"
android:strokeWidth="6.91728"
android:fillColor="#ff6d00"
android:strokeColor="#00000000"/>
<path
android:pathData="M38.62,63.866 L52.899,78.144 86.38,44.664"
android:strokeLineJoin="miter"
android:strokeWidth="6.2"
android:fillColor="#00000000"
android:strokeColor="#ffffff"
android:strokeLineCap="butt"/>
</vector>
@@ -0,0 +1,22 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="125dp"
android:height="125dp"
android:viewportWidth="125"
android:viewportHeight="125">
<path
android:pathData="M62.5,62.5m-59.984,0a59.984,59.984 0,1 1,119.968 0a59.984,59.984 0,1 1,-119.968 0"
android:strokeWidth="5.03185"
android:fillColor="#00000000"
android:strokeColor="#ff6d00"/>
<path
android:pathData="M62.5,62.5m-50,0a50,50 0,1 1,100 0a50,50 0,1 1,-100 0"
android:strokeWidth="6.91728"
android:fillColor="#ff6d00"
android:strokeColor="#00000000"/>
<path
android:pathData="M87.6,62.5 L67.991,73.822 48.381,85.143l-0,-22.643 0,-22.643 19.61,11.322z"
android:strokeWidth="6.67087"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:strokeLineCap="round"/>
</vector>
+5 -5
View File
@@ -7,16 +7,16 @@
<path android:pathData="M82.489,12.834C83.196,10.418 82.043,9.556 79.926,10.917L10.087,55.828c-2.117,1.361 -1.795,2.628 0.714,2.815L39.806,60.807c2.51,0.188 5.291,2.267 6.18,4.621l10.282,27.208c0.89,2.354 2.195,2.304 2.902,-0.111z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="81.73018"
android:endY="11.204678"
android:startX="27.696081"
android:startY="83.44198"
android:endX="70.0"
android:endY="30.0"
android:startX="7.0"
android:startY="83.0"
android:type="linear">
<item
android:color="#FFFBB22F"
android:offset="0" />
<item
android:color="#FFF58820"
android:color="#FFFF6D00"
android:offset="1" />
</gradient>
</aapt:attr>
-16
View File
@@ -1,16 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="32dp"
android:height="32dp"
android:viewportWidth="48"
android:viewportHeight="48">
<path
android:fillAlpha="1"
android:fillColor="#a31a1f"
android:pathData="M15,14h5v20h-5z"
android:strokeWidth="1.01154423" />
<path
android:fillAlpha="1"
android:fillColor="#a31a1f"
android:pathData="M27,14h5v20h-5z"
android:strokeWidth="1.01154423" />
</vector>
@@ -1,66 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2013 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/controller_container"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/controller_background"
android:orientation="vertical"
android:paddingStart="8dp"
android:paddingEnd="8dp">
<ImageButton
android:id="@+id/controller_record"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="10"
android:background="@android:color/transparent"
android:contentDescription="@string/image_record"
android:src="@drawable/ic_button_record" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="6">
<TextView
android:id="@+id/controller_total_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle2"
android:layout_centerInParent="true"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/controller_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle2"
android:layout_above="@id/controller_total_time"
android:layout_centerHorizontal="true"
android:singleLine="true" />
</RelativeLayout>
<ImageButton
android:id="@+id/controller_stop"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="10"
android:background="@android:color/transparent"
android:contentDescription="@string/image_stop"
android:src="@drawable/button_stop" />
</LinearLayout>
-100
View File
@@ -1,100 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2013 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="vertical">
<include layout="@layout/toolbar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="horizontal">
<androidx.fragment.app.FragmentContainerView
android:id="@+id/controller_fragment"
android:name="de.dennisguse.opentracks.ControllerFragment"
android:layout_width="wrap_content"
android:layout_height="match_parent" />
<ListView
android:id="@+id/track_list"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.0" />
<RelativeLayout
android:id="@+id/track_list_empty_view"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.0">
<LinearLayout
android:id="@+id/track_list_arrow_long"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentStart="true"
android:orientation="vertical"
android:paddingStart="12dp"
android:paddingEnd="16dp">
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="10"
android:contentDescription="@string/image_arrow"
android:src="@drawable/ic_arrow_long" />
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="17" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_toEndOf="@id/track_list_arrow_long"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="4" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="24">
<TextView
style="?attr/textAppearanceHeadline6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/track_list_empty_message" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
@@ -1,47 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/toolbar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<androidx.fragment.app.FragmentContainerView
android:id="@+id/controller_fragment"
android:name="de.dennisguse.opentracks.ControllerFragment"
android:layout_width="wrap_content"
android:layout_height="match_parent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.google.android.material.tabs.TabLayout
android:id="@+id/track_detail_activity_tablayout"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/track_recording_coordinator_layout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/track_detail_activity_view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
+105 -97
View File
@@ -1,117 +1,125 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="match_parent">
<include layout="@layout/toolbar" />
<ScrollView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="50dp">
<LinearLayout
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="20dp">
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_margin="8dp">
android:orientation="vertical"
android:padding="20dp">
<ImageView
android:id="@+id/imageView"
android:layout_width="30dp"
android:layout_height="match_parent"
android:contentDescription="@string/app_name"
android:scaleType="fitCenter"
android:src="@drawable/ic_logo_color_24dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_margin="8dp">
<ImageView
android:id="@+id/imageView"
android:layout_width="30dp"
android:layout_height="match_parent"
android:contentDescription="@string/app_name"
android:scaleType="fitCenter"
android:src="@drawable/ic_logo_color_24dp" />
<TextView
android:id="@+id/about_text_description"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textAppearance="?attr/textAppearanceSubtitle1"
android:gravity="center"
android:padding="12dp" />
</LinearLayout>
<View style="@style/HorizontalLine" />
<TextView
android:id="@+id/about_text_description"
android:id="@+id/about_text_version_name"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceSubtitle1"
android:gravity="center"
android:padding="12dp" />
android:padding="6dp" />
<TextView
android:id="@+id/about_text_version_code"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceBody1"
android:gravity="center"
android:padding="6dp" />
<TextView
android:id="@+id/about_app_url"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceBody1"
android:autoLink="web"
android:gravity="center"
android:padding="6dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceBody1"
android:gravity="center"
android:linksClickable="true"
android:padding="6dp"
android:text="@string/about_history" />
<View style="@style/HorizontalLine" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceBody1"
android:gravity="center"
android:padding="12dp"
android:text="@string/about_third_party_data" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceBody1"
android:gravity="center"
android:padding="12dp"
android:text="@string/third_party_data" />
<View style="@style/HorizontalLine" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceSubtitle1"
android:gravity="center"
android:padding="12dp"
android:text="@string/about_libraries" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceBody1"
android:gravity="center"
android:linksClickable="true"
android:text="@string/third_party_libraries" />
</LinearLayout>
</ScrollView>
<View style="@style/HorizontalLine" />
</LinearLayout>
<TextView
android:id="@+id/about_text_version_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceSubtitle1"
android:gravity="center"
android:padding="6dp" />
<include android:id="@+id/bottom_app_bar_layout" layout="@layout/bottomappbar" />
<TextView
android:id="@+id/about_text_version_code"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceBody1"
android:gravity="center"
android:padding="6dp" />
<TextView
android:id="@+id/about_app_url"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceBody1"
android:autoLink="web"
android:gravity="center"
android:padding="6dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceBody1"
android:gravity="center"
android:linksClickable="true"
android:padding="6dp"
android:text="@string/about_history" />
<View style="@style/HorizontalLine" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceBody1"
android:gravity="center"
android:padding="12dp"
android:text="@string/about_third_party_data" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceBody1"
android:gravity="center"
android:padding="12dp"
android:text="@string/third_party_data" />
<View style="@style/HorizontalLine" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceSubtitle1"
android:gravity="center"
android:padding="12dp"
android:text="@string/about_libraries" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceBody1"
android:gravity="center"
android:linksClickable="true"
android:text="@string/third_party_libraries" />
</LinearLayout>
</ScrollView>
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
@@ -1,53 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
android:layout_height="match_parent">
<include layout="@layout/toolbar" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/rows_options_layout"
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox.ExposedDropdownMenu"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/settings_recording_customize_layout_select_columns">
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:paddingBottom="60dp">
<de.dennisguse.opentracks.ui.util.AutoCompleteTextViewForDropdown
android:id="@+id/rows_options"
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/rows_options_layout"
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox.ExposedDropdownMenu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="none" />
android:hint="@string/settings_recording_customize_layout_select_columns">
</com.google.android.material.textfield.TextInputLayout>
<de.dennisguse.opentracks.ui.util.AutoCompleteTextViewForDropdown
android:id="@+id/rows_options"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="none" />
<androidx.core.widget.NestedScrollView
android:id="@+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</com.google.android.material.textfield.TextInputLayout>
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.core.widget.NestedScrollView
android:id="@+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_visible"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/recycler_view_not_visible" />
android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_not_visible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
app:layout_constraintTop_toBottomOf="@id/recycler_view_visible"
app:layout_constraintBottom_toBottomOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_visible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/recycler_view_not_visible" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_not_visible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
app:layout_constraintTop_toBottomOf="@id/recycler_view_visible"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
<include android:id="@+id/bottom_app_bar_layout" layout="@layout/bottomappbar" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
@@ -1,72 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<include layout="@layout/toolbar" />
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/custom_layout_list_add_linear_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_marginBottom="50dp"
android:visibility="gone"
tools:visibility="visible">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/custom_layout_list_input_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
app:errorEnabled="true"
android:layout_margin="16dp">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/custom_layout_list_edit_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textCapWords"
android:imeOptions="actionDone"
android:hint="@string/custom_layout_list_edit_name" />
</com.google.android.material.textfield.TextInputLayout>
android:paddingBottom="60dp">
<LinearLayout
android:id="@+id/custom_layout_list_bottom_bar"
android:id="@+id/custom_layout_list_add_linear_layout"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_margin="16dp"
android:gravity="end"
android:orientation="horizontal">
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="vertical"
android:layout_marginBottom="50dp"
android:visibility="gone"
tools:visibility="visible">
<com.google.android.material.button.MaterialButton
android:id="@+id/custom_layout_list_cancel_button"
android:layout_width="wrap_content"
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/custom_layout_list_input_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:text="@android:string/cancel" />
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
app:errorEnabled="true"
android:layout_margin="16dp">
<com.google.android.material.button.MaterialButton
android:id="@+id/custom_layout_list_ok_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="false"
android:text="@android:string/ok" />
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/custom_layout_list_edit_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textCapWords"
android:imeOptions="actionDone"
android:hint="@string/custom_layout_list_edit_name" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:id="@+id/custom_layout_list_bottom_bar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_margin="16dp"
android:gravity="end"
android:orientation="horizontal">
<com.google.android.material.button.MaterialButton
android:id="@+id/custom_layout_list_cancel_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:text="@android:string/cancel" />
<com.google.android.material.button.MaterialButton
android:id="@+id/custom_layout_list_ok_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="false"
android:text="@android:string/ok" />
</LinearLayout>
<View style="@style/HorizontalLine" />
</LinearLayout>
<View style="@style/HorizontalLine" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<include android:id="@+id/bottom_app_bar_layout" layout="@layout/bottomappbar" />
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+25 -17
View File
@@ -1,23 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="match_parent">
<include layout="@layout/toolbar" />
<ListView
android:id="@+id/aggregated_stats_list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<TextView
android:id="@+id/aggregated_stats_empty_view"
style="?attr/textAppearanceHeadline4"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
android:gravity="center_horizontal|center_vertical"
android:text="@string/aggregated_stats_empty_message" />
android:orientation="vertical"
android:paddingBottom="50dp">
</LinearLayout>
<ListView
android:id="@+id/aggregated_stats_list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<TextView
android:id="@+id/aggregated_stats_empty_view"
style="?attr/textAppearanceHeadline4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
android:gravity="center_horizontal|center_vertical"
android:text="@string/aggregated_stats_empty_message" />
</LinearLayout>
<include android:id="@+id/bottom_app_bar_layout" layout="@layout/bottomappbar" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+36
View File
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/bottom_app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:navigationIcon="@drawable/ic_baseline_arrow_back_24">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/bottom_app_bar_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:maxLines="1"
android:singleLine="true"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.OpenTracks.OnBottomBarText" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.bottomappbar.BottomAppBar>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
@@ -1,72 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2012 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/controller_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/controller_background"
android:paddingTop="8dp"
android:paddingBottom="8dp">
<ImageButton
android:id="@+id/controller_record"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="10"
android:background="@android:color/transparent"
android:contentDescription="@string/image_record"
android:src="@drawable/ic_button_record" />
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="6">
<TextView
android:id="@+id/controller_total_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle2"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:gravity="center"
android:textColor="@android:color/white"
tools:text="0:12:34" />
<TextView
android:id="@+id/controller_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle2"
android:layout_above="@id/controller_total_time"
android:layout_alignParentStart="true"
android:gravity="center"
android:singleLine="true"
tools:text="@string/generic_recording" />
</RelativeLayout>
<ImageButton
android:id="@+id/controller_stop"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="10"
android:background="@android:color/transparent"
android:contentDescription="@string/image_stop"
android:src="@drawable/button_stop" />
</LinearLayout>
+291 -284
View File
@@ -1,305 +1,312 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical">
android:layout_height="match_parent">
<include layout="@layout/toolbar" />
<androidx.core.widget.NestedScrollView
android:layout_weight="1"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp">
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:paddingBottom="50dp">
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.core.widget.NestedScrollView
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="0dp">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_vertical_half"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.7" />
<TextView
android:id="@+id/export_progress_done"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:layout_marginStart="24dp"
android:layout_marginTop="48dp"
app:layout_constraintEnd_toStartOf="@id/export_progress_slash"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="1" />
<TextView
android:id="@+id/export_progress_slash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:text="@string/generic_separator_done_total"
app:layout_constraintBottom_toBottomOf="@id/export_progress_done"
app:layout_constraintEnd_toStartOf="@id/export_progress_total"
app:layout_constraintStart_toEndOf="@id/export_progress_done"
app:layout_constraintTop_toTopOf="@id/export_progress_done" />
<TextView
android:id="@+id/export_progress_total"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:layout_marginEnd="24dp"
app:layout_constraintBottom_toBottomOf="@id/export_progress_slash"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/export_progress_slash"
app:layout_constraintTop_toTopOf="@id/export_progress_slash"
tools:text="10" />
<com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/export_progress_bar"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/export_progress_done"
tools:progress="25" />
android:layout_height="match_parent">
<!-- Start Summary -->
<!-- Tracks exported (new tracks) -->
<TextView
android:id="@+id/export_progress_summary_new_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:gravity="end"
android:layout_margin="16dp"
android:text="@string/export_progress_summary_new_msg"
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_half"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/export_progress_bar" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_vertical_half"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.7" />
<TextView
android:id="@+id/export_progress_summary_new"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
app:layout_constraintBottom_toBottomOf="@id/export_progress_summary_new_msg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/guideline_vertical_half"
app:layout_constraintTop_toTopOf="@id/export_progress_summary_new_msg"
tools:text="10" />
<TextView
android:id="@+id/export_progress_done"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:layout_marginStart="24dp"
android:layout_marginTop="48dp"
app:layout_constraintEnd_toStartOf="@id/export_progress_slash"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="1" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/export_progress_summary_new_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="export_progress_summary_new_msg,export_progress_summary_new" />
<TextView
android:id="@+id/export_progress_slash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:text="@string/generic_separator_done_total"
app:layout_constraintBottom_toBottomOf="@id/export_progress_done"
app:layout_constraintEnd_toStartOf="@id/export_progress_total"
app:layout_constraintStart_toEndOf="@id/export_progress_done"
app:layout_constraintTop_toTopOf="@id/export_progress_done" />
<androidx.constraintlayout.widget.Group
android:id="@+id/export_progress_summary_new_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<TextView
android:id="@+id/export_progress_total"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:layout_marginEnd="24dp"
app:layout_constraintBottom_toBottomOf="@id/export_progress_slash"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/export_progress_slash"
app:layout_constraintTop_toTopOf="@id/export_progress_slash"
tools:text="10" />
<com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/export_progress_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/export_progress_done"
tools:progress="25" />
<!-- Start Summary -->
<!-- Tracks exported (new tracks) -->
<TextView
android:id="@+id/export_progress_summary_new_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:gravity="end"
android:layout_margin="16dp"
android:text="@string/export_progress_summary_new_msg"
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_half"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/export_progress_bar" />
<TextView
android:id="@+id/export_progress_summary_new"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
app:layout_constraintBottom_toBottomOf="@id/export_progress_summary_new_msg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/guideline_vertical_half"
app:layout_constraintTop_toTopOf="@id/export_progress_summary_new_msg"
tools:text="10" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/export_progress_summary_new_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="export_progress_summary_new_msg,export_progress_summary_new" />
<androidx.constraintlayout.widget.Group
android:id="@+id/export_progress_summary_new_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
tools:visibility="visible"
app:constraint_referenced_ids="export_progress_summary_new_msg,export_progress_summary_new" />
<!-- Tracks overwritten -->
<TextView
android:id="@+id/export_progress_summary_overwrite_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:gravity="end"
android:layout_margin="16dp"
android:text="@string/export_progress_summary_overwrite_msg"
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_half"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/export_progress_summary_new_barrier" />
<TextView
android:id="@+id/export_progress_summary_overwrite"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
app:layout_constraintBottom_toBottomOf="@id/export_progress_summary_overwrite_msg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/guideline_vertical_half"
app:layout_constraintTop_toTopOf="@id/export_progress_summary_overwrite_msg"
tools:text="10" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/export_progress_summary_overwrite_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="export_progress_summary_overwrite_msg,export_progress_summary_overwrite" />
<androidx.constraintlayout.widget.Group
android:id="@+id/export_progress_summary_overwrite_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
tools:visibility="visible"
app:constraint_referenced_ids="export_progress_summary_overwrite_msg,export_progress_summary_overwrite" />
<!-- Tracks skipped -->
<TextView
android:id="@+id/export_progress_summary_skip_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:gravity="end"
android:layout_margin="16dp"
android:text="@string/export_progress_summary_skip_msg"
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_half"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/export_progress_summary_overwrite_barrier" />
<TextView
android:id="@+id/export_progress_summary_skip"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
app:layout_constraintBottom_toBottomOf="@id/export_progress_summary_skip_msg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/guideline_vertical_half"
app:layout_constraintTop_toTopOf="@id/export_progress_summary_skip_msg"
tools:text="10" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/export_progress_summary_skip_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="export_progress_summary_skip_msg,export_progress_summary_skip" />
<androidx.constraintlayout.widget.Group
android:id="@+id/export_progress_summary_skip_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
tools:visibility="visible"
app:constraint_referenced_ids="export_progress_summary_skip_msg,export_progress_summary_skip" />
<!-- Tracks errors -->
<TextView
android:id="@+id/export_progress_summary_errors_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:gravity="end"
android:layout_margin="16dp"
android:text="@string/export_progress_summary_errors_msg"
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_half"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/export_progress_summary_skip_barrier" />
<TextView
android:id="@+id/export_progress_summary_errors"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
app:layout_constraintBottom_toBottomOf="@id/export_progress_summary_errors_msg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/guideline_vertical_half"
app:layout_constraintTop_toTopOf="@id/export_progress_summary_errors_msg"
tools:text="10" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/export_progress_summary_errors_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="export_progress_summary_errors_msg,export_progress_summary_errors" />
<androidx.constraintlayout.widget.Group
android:id="@+id/export_progress_summary_errors_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
tools:visibility="visible"
app:constraint_referenced_ids="export_progress_summary_errors_msg,export_progress_summary_errors" />
<!-- End Summary -->
<ImageView
android:id="@+id/export_progress_alert_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginEnd="8dp"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintBottom_toBottomOf="@id/export_progress_alert_msg"
app:layout_constraintEnd_toStartOf="@id/export_progress_alert_msg"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/export_progress_alert_msg"
app:srcCompat="@drawable/ic_report_problem_24" />
<TextView
android:id="@+id/export_progress_alert_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:layout_marginTop="48dp"
android:layout_marginEnd="24dp"
android:layout_marginBottom="24dp"
app:layout_constraintBottom_toTopOf="@id/export_progress_apply_to_all"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/export_progress_alert_icon"
app:layout_constraintTop_toBottomOf="@id/export_progress_summary_errors_barrier"
app:layout_constraintVertical_chainStyle="packed"
tools:text="The track already exists" />
<CheckBox
android:id="@+id/export_progress_apply_to_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:layout_marginBottom="24dp"
android:checked="false"
android:text="@string/export_all_do_it_for_all"
android:visibility="gone"
tools:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/export_progress_alert_msg" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
<View style="@style/BottomButtonDivider" />
<LinearLayout style="@style/BottomButtonBar">
<Button
android:id="@+id/export_progress_left_button"
style="@style/BottomButton"
android:layout_gravity="center"
android:text="@string/generic_skip"
android:visibility="gone"
tools:visibility="visible"
app:constraint_referenced_ids="export_progress_summary_new_msg,export_progress_summary_new" />
tools:visibility="visible" />
<!-- Tracks overwritten -->
<TextView
android:id="@+id/export_progress_summary_overwrite_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:gravity="end"
android:layout_margin="16dp"
android:text="@string/export_progress_summary_overwrite_msg"
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_half"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/export_progress_summary_new_barrier" />
<TextView
android:id="@+id/export_progress_summary_overwrite"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
app:layout_constraintBottom_toBottomOf="@id/export_progress_summary_overwrite_msg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/guideline_vertical_half"
app:layout_constraintTop_toTopOf="@id/export_progress_summary_overwrite_msg"
tools:text="10" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/export_progress_summary_overwrite_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="export_progress_summary_overwrite_msg,export_progress_summary_overwrite" />
<androidx.constraintlayout.widget.Group
android:id="@+id/export_progress_summary_overwrite_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<Button
android:id="@+id/export_progress_right_button"
style="@style/BottomButton"
android:layout_gravity="end"
android:text="@string/generic_overwrite"
android:visibility="gone"
tools:visibility="visible"
app:constraint_referenced_ids="export_progress_summary_overwrite_msg,export_progress_summary_overwrite" />
tools:visibility="visible"/>
<!-- Tracks skipped -->
<TextView
android:id="@+id/export_progress_summary_skip_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:gravity="end"
android:layout_margin="16dp"
android:text="@string/export_progress_summary_skip_msg"
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_half"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/export_progress_summary_overwrite_barrier" />
<TextView
android:id="@+id/export_progress_summary_skip"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
app:layout_constraintBottom_toBottomOf="@id/export_progress_summary_skip_msg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/guideline_vertical_half"
app:layout_constraintTop_toTopOf="@id/export_progress_summary_skip_msg"
tools:text="10" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/export_progress_summary_skip_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="export_progress_summary_skip_msg,export_progress_summary_skip" />
<androidx.constraintlayout.widget.Group
android:id="@+id/export_progress_summary_skip_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
tools:visibility="visible"
app:constraint_referenced_ids="export_progress_summary_skip_msg,export_progress_summary_skip" />
<!-- Tracks errors -->
<TextView
android:id="@+id/export_progress_summary_errors_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:gravity="end"
android:layout_margin="16dp"
android:text="@string/export_progress_summary_errors_msg"
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_half"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/export_progress_summary_skip_barrier" />
<TextView
android:id="@+id/export_progress_summary_errors"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
app:layout_constraintBottom_toBottomOf="@id/export_progress_summary_errors_msg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/guideline_vertical_half"
app:layout_constraintTop_toTopOf="@id/export_progress_summary_errors_msg"
tools:text="10" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/export_progress_summary_errors_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="export_progress_summary_errors_msg,export_progress_summary_errors" />
<androidx.constraintlayout.widget.Group
android:id="@+id/export_progress_summary_errors_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
tools:visibility="visible"
app:constraint_referenced_ids="export_progress_summary_errors_msg,export_progress_summary_errors" />
<!-- End Summary -->
<ImageView
android:id="@+id/export_progress_alert_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginEnd="8dp"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintBottom_toBottomOf="@id/export_progress_alert_msg"
app:layout_constraintEnd_toStartOf="@id/export_progress_alert_msg"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/export_progress_alert_msg"
app:srcCompat="@drawable/ic_report_problem_24" />
<TextView
android:id="@+id/export_progress_alert_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:layout_marginTop="48dp"
android:layout_marginEnd="24dp"
android:layout_marginBottom="24dp"
app:layout_constraintBottom_toTopOf="@id/export_progress_apply_to_all"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/export_progress_alert_icon"
app:layout_constraintTop_toBottomOf="@id/export_progress_summary_errors_barrier"
app:layout_constraintVertical_chainStyle="packed"
tools:text="The track already exists" />
<CheckBox
android:id="@+id/export_progress_apply_to_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:layout_marginBottom="24dp"
android:checked="false"
android:text="@string/export_all_do_it_for_all"
android:visibility="gone"
tools:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/export_progress_alert_msg" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
<View style="@style/BottomButtonDivider" />
<LinearLayout style="@style/BottomButtonBar">
<Button
android:id="@+id/export_progress_left_button"
style="@style/BottomButton"
android:layout_gravity="center"
android:text="@string/generic_skip"
android:visibility="gone"
tools:visibility="visible" />
<Button
android:id="@+id/export_progress_right_button"
style="@style/BottomButton"
android:layout_gravity="end"
android:text="@string/generic_overwrite"
android:visibility="gone"
tools:visibility="visible"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<include android:id="@+id/bottom_app_bar_layout" layout="@layout/bottomappbar" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+120 -112
View File
@@ -1,139 +1,147 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="match_parent">
<include layout="@layout/toolbar" />
<ScrollView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="50dp">
<LinearLayout
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="20dp">
android:layout_height="wrap_content">
<TextView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6"
android:text="@string/help_feature_title" />
android:orientation="vertical"
android:padding="20dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceBody1"
android:text="@string/help_feature_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6"
android:text="@string/help_feature_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6"
android:layout_marginTop="20dp"
android:text="@string/help_track_map_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceBody1"
android:text="@string/help_feature_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceBody1"
android:linksClickable="true"
android:text="@string/help_track_map_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6"
android:layout_marginTop="20dp"
android:text="@string/help_track_map_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6"
android:layout_marginTop="20dp"
android:text="@string/help_recording_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceBody1"
android:linksClickable="true"
android:text="@string/help_track_map_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceBody1"
android:text="@string/help_recording_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6"
android:layout_marginTop="20dp"
android:text="@string/help_recording_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6"
android:layout_marginTop="20dp"
android:text="@string/help_storage_pictures_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceBody1"
android:text="@string/help_recording_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceBody1"
android:text="@string/help_storage_pictures_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6"
android:layout_marginTop="20dp"
android:text="@string/help_storage_pictures_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6"
android:layout_marginTop="20dp"
android:text="@string/help_track_export_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceBody1"
android:text="@string/help_storage_pictures_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceBody1"
android:text="@string/help_track_export_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6"
android:layout_marginTop="20dp"
android:text="@string/help_track_export_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6"
android:text="@string/help_data_google_play_services_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceBody1"
android:text="@string/help_track_export_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceBody1"
android:text="@android:string/no" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6"
android:text="@string/help_data_google_play_services_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6"
android:layout_marginTop="20dp"
android:text="@string/help_data_storage_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceBody1"
android:text="@android:string/no" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceBody1"
android:text="@string/help_data_storage_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6"
android:layout_marginTop="20dp"
android:text="@string/help_data_storage_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6"
android:layout_marginTop="20dp"
android:text="@string/help_gps_troubleshooting_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceBody1"
android:text="@string/help_data_storage_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceBody1"
android:linksClickable="true"
android:text="@string/help_gps_troubleshooting_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6"
android:layout_marginTop="20dp"
android:text="@string/help_gps_troubleshooting_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6"
android:layout_marginTop="20dp"
android:text="@string/help_support_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceBody1"
android:linksClickable="true"
android:text="@string/help_gps_troubleshooting_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceBody1"
android:linksClickable="true"
android:text="@string/help_support_content" />
</LinearLayout>
</ScrollView>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6"
android:layout_marginTop="20dp"
android:text="@string/help_support_title" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textAppearanceBody1"
android:linksClickable="true"
android:text="@string/help_support_content" />
</LinearLayout>
</ScrollView>
</LinearLayout>
<include android:id="@+id/bottom_app_bar_layout" layout="@layout/bottomappbar" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+236 -229
View File
@@ -1,249 +1,256 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical">
android:layout_height="match_parent">
<include layout="@layout/toolbar" />
<androidx.core.widget.NestedScrollView
android:layout_weight="1"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp">
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:paddingBottom="50dp">
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.core.widget.NestedScrollView
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="0dp">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_vertical_half"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.7" />
<TextView
android:id="@+id/import_progress_done"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:layout_marginStart="24dp"
android:layout_marginTop="48dp"
app:layout_constraintEnd_toStartOf="@id/import_progress_slash"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="1" />
<TextView
android:id="@+id/import_progress_slash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:text="@string/generic_separator_done_total"
app:layout_constraintBottom_toBottomOf="@id/import_progress_done"
app:layout_constraintEnd_toStartOf="@id/import_progress_total"
app:layout_constraintStart_toEndOf="@id/import_progress_done"
app:layout_constraintTop_toTopOf="@id/import_progress_done" />
<TextView
android:id="@+id/import_progress_total"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:layout_marginEnd="24dp"
app:layout_constraintBottom_toBottomOf="@id/import_progress_slash"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/import_progress_slash"
app:layout_constraintTop_toTopOf="@id/import_progress_slash"
tools:text="10" />
<com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/import_progress_bar"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/import_progress_done"
tools:progress="25" />
android:layout_height="match_parent">
<!-- Start Summary -->
<!-- Files imported correctly -->
<TextView
android:id="@+id/import_progress_summary_ok_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:gravity="end"
android:layout_margin="16dp"
android:text="@string/import_progress_summary_ok_msg"
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_half"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/import_progress_bar" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_vertical_half"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.7" />
<TextView
android:id="@+id/import_progress_summary_ok"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
app:layout_constraintBottom_toBottomOf="@id/import_progress_summary_ok_msg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/guideline_vertical_half"
app:layout_constraintTop_toTopOf="@id/import_progress_summary_ok_msg"
tools:text="10" />
<TextView
android:id="@+id/import_progress_done"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:layout_marginStart="24dp"
android:layout_marginTop="48dp"
app:layout_constraintEnd_toStartOf="@id/import_progress_slash"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="1" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/import_progress_summary_ok_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="import_progress_summary_ok_msg,import_progress_summary_ok" />
<TextView
android:id="@+id/import_progress_slash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:text="@string/generic_separator_done_total"
app:layout_constraintBottom_toBottomOf="@id/import_progress_done"
app:layout_constraintEnd_toStartOf="@id/import_progress_total"
app:layout_constraintStart_toEndOf="@id/import_progress_done"
app:layout_constraintTop_toTopOf="@id/import_progress_done" />
<androidx.constraintlayout.widget.Group
android:id="@+id/import_progress_summary_ok_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<TextView
android:id="@+id/import_progress_total"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:layout_marginEnd="24dp"
app:layout_constraintBottom_toBottomOf="@id/import_progress_slash"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/import_progress_slash"
app:layout_constraintTop_toTopOf="@id/import_progress_slash"
tools:text="10" />
<com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/import_progress_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/import_progress_done"
tools:progress="25" />
<!-- Start Summary -->
<!-- Files imported correctly -->
<TextView
android:id="@+id/import_progress_summary_ok_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:gravity="end"
android:layout_margin="16dp"
android:text="@string/import_progress_summary_ok_msg"
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_half"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/import_progress_bar" />
<TextView
android:id="@+id/import_progress_summary_ok"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
app:layout_constraintBottom_toBottomOf="@id/import_progress_summary_ok_msg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/guideline_vertical_half"
app:layout_constraintTop_toTopOf="@id/import_progress_summary_ok_msg"
tools:text="10" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/import_progress_summary_ok_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="import_progress_summary_ok_msg,import_progress_summary_ok" />
<androidx.constraintlayout.widget.Group
android:id="@+id/import_progress_summary_ok_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
tools:visibility="visible"
app:constraint_referenced_ids="import_progress_summary_ok_msg,import_progress_summary_ok" />
<!-- Already exists files -->
<TextView
android:id="@+id/import_progress_summary_exists_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:gravity="end"
android:layout_margin="16dp"
android:text="@string/import_progress_summary_exists_msg"
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_half"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/import_progress_summary_ok_barrier" />
<TextView
android:id="@+id/import_progress_summary_exists"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
app:layout_constraintBottom_toBottomOf="@id/import_progress_summary_exists_msg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/guideline_vertical_half"
app:layout_constraintTop_toTopOf="@id/import_progress_summary_exists_msg"
tools:text="10" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/import_progress_summary_exists_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="import_progress_summary_exists_msg,import_progress_summary_exists" />
<androidx.constraintlayout.widget.Group
android:id="@+id/import_progress_summary_exists_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
tools:visibility="visible"
app:constraint_referenced_ids="import_progress_summary_exists_msg,import_progress_summary_exists" />
<!-- Importing error files -->
<TextView
android:id="@+id/import_progress_summary_errors_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:gravity="end"
android:layout_margin="16dp"
android:text="@string/import_progress_summary_errors_msg"
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_half"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/import_progress_summary_exists_barrier" />
<TextView
android:id="@+id/import_progress_summary_errors"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
app:layout_constraintBottom_toBottomOf="@id/import_progress_summary_errors_msg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/guideline_vertical_half"
app:layout_constraintTop_toTopOf="@id/import_progress_summary_errors_msg"
tools:text="10" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/import_progress_summary_errors_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="import_progress_summary_errors_msg,import_progress_summary_errors" />
<androidx.constraintlayout.widget.Group
android:id="@+id/import_progress_summary_errors_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
tools:visibility="visible"
app:constraint_referenced_ids="import_progress_summary_errors_msg,import_progress_summary_errors" />
<!-- End Summary -->
<ImageView
android:id="@+id/import_progress_alert_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginEnd="8dp"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintBottom_toBottomOf="@id/import_progress_alert_msg"
app:layout_constraintEnd_toStartOf="@id/import_progress_alert_msg"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/import_progress_alert_msg"
app:srcCompat="@drawable/ic_report_problem_24" />
<TextView
android:id="@+id/import_progress_alert_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:layout_marginTop="48dp"
android:layout_marginEnd="24dp"
android:layout_marginBottom="24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/import_progress_alert_icon"
app:layout_constraintTop_toBottomOf="@id/import_progress_summary_errors_barrier"
app:layout_constraintVertical_chainStyle="packed"
tools:text="Import progress alert message" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
<View style="@style/BottomButtonDivider" />
<LinearLayout style="@style/BottomButtonBar">
<Button
android:id="@+id/import_progress_left_button"
style="@style/BottomButton"
android:layout_gravity="center"
android:text="@string/generic_show_errors"
android:visibility="gone"
tools:visibility="visible"
app:constraint_referenced_ids="import_progress_summary_ok_msg,import_progress_summary_ok" />
tools:visibility="visible" />
<!-- Already exists files -->
<TextView
android:id="@+id/import_progress_summary_exists_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:gravity="end"
android:layout_margin="16dp"
android:text="@string/import_progress_summary_exists_msg"
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_half"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/import_progress_summary_ok_barrier" />
<TextView
android:id="@+id/import_progress_summary_exists"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
app:layout_constraintBottom_toBottomOf="@id/import_progress_summary_exists_msg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/guideline_vertical_half"
app:layout_constraintTop_toTopOf="@id/import_progress_summary_exists_msg"
tools:text="10" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/import_progress_summary_exists_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="import_progress_summary_exists_msg,import_progress_summary_exists" />
<androidx.constraintlayout.widget.Group
android:id="@+id/import_progress_summary_exists_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<Button
android:id="@+id/import_progress_right_button"
style="@style/BottomButton"
android:layout_gravity="end"
android:text="@android:string/ok"
android:visibility="gone"
tools:visibility="visible"
app:constraint_referenced_ids="import_progress_summary_exists_msg,import_progress_summary_exists" />
tools:visibility="visible"/>
</LinearLayout>
<!-- Importing error files -->
<TextView
android:id="@+id/import_progress_summary_errors_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:gravity="end"
android:layout_margin="16dp"
android:text="@string/import_progress_summary_errors_msg"
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_half"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/import_progress_summary_exists_barrier" />
<TextView
android:id="@+id/import_progress_summary_errors"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
app:layout_constraintBottom_toBottomOf="@id/import_progress_summary_errors_msg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/guideline_vertical_half"
app:layout_constraintTop_toTopOf="@id/import_progress_summary_errors_msg"
tools:text="10" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/import_progress_summary_errors_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="import_progress_summary_errors_msg,import_progress_summary_errors" />
<androidx.constraintlayout.widget.Group
android:id="@+id/import_progress_summary_errors_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
tools:visibility="visible"
app:constraint_referenced_ids="import_progress_summary_errors_msg,import_progress_summary_errors" />
<!-- End Summary -->
<ImageView
android:id="@+id/import_progress_alert_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginEnd="8dp"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintBottom_toBottomOf="@id/import_progress_alert_msg"
app:layout_constraintEnd_toStartOf="@id/import_progress_alert_msg"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/import_progress_alert_msg"
app:srcCompat="@drawable/ic_report_problem_24" />
<TextView
android:id="@+id/import_progress_alert_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1"
android:layout_marginTop="48dp"
android:layout_marginEnd="24dp"
android:layout_marginBottom="24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/import_progress_alert_icon"
app:layout_constraintTop_toBottomOf="@id/import_progress_summary_errors_barrier"
app:layout_constraintVertical_chainStyle="packed"
tools:text="Import progress alert message" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
<View style="@style/BottomButtonDivider" />
<LinearLayout style="@style/BottomButtonBar">
<Button
android:id="@+id/import_progress_left_button"
style="@style/BottomButton"
android:layout_gravity="center"
android:text="@string/generic_show_errors"
android:visibility="gone"
tools:visibility="visible" />
<Button
android:id="@+id/import_progress_right_button"
style="@style/BottomButton"
android:layout_gravity="end"
android:text="@android:string/ok"
android:visibility="gone"
tools:visibility="visible"/>
</LinearLayout>
</LinearLayout>
<include android:id="@+id/bottom_app_bar_layout" layout="@layout/bottomappbar" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+15 -9
View File
@@ -13,15 +13,21 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="match_parent">
<include layout="@layout/toolbar" />
<androidx.viewpager.widget.ViewPager
android:id="@+id/maker_detail_activity_view_pager"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.viewpager.widget.ViewPager
android:id="@+id/maker_detail_activity_view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<include android:id="@+id/bottom_app_bar_layout" layout="@layout/bottomappbar" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+105 -98
View File
@@ -13,124 +13,131 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="match_parent">
<include layout="@layout/toolbar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="50dp">
<ScrollView style="@style/ScrollView.WithBottomButtons">
<ScrollView style="@style/ScrollView.WithBottomButtons">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp">
<com.google.android.material.textfield.TextInputLayout
<LinearLayout
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">
android:orientation="vertical"
android:padding="8dp">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/marker_edit_name"
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_marker_orange_pushpin_with_shadow"
android:inputType="textCapWords"
android:selectAllOnFocus="true" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
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/marker_edit_marker_type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/marker_edit_marker_type"
style="?attr/textInputOutlinedStyle"
android:hint="@string/generic_name"
android:imeOptions="actionNext"
android:selectAllOnFocus="true" />
android:importantForAutofill="no"
android:layout_marginBottom="16dp">
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/marker_edit_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_marker_orange_pushpin_with_shadow"
android:inputType="textCapWords"
android:selectAllOnFocus="true" />
<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.TextInputLayout>
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/marker_edit_description"
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textCapSentences"
android:selectAllOnFocus="true" />
style="?attr/textInputOutlinedExposedDropdownMenuStyle"
android:imeOptions="actionNext"
android:importantForAutofill="no"
android:layout_marginBottom="16dp">
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/marker_edit_marker_type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/marker_edit_marker_type"
android:imeOptions="actionNext"
android:selectAllOnFocus="true" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp">
</com.google.android.material.textfield.TextInputLayout>
<ImageView
android:id="@+id/marker_edit_photo"
<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/marker_edit_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textCapSentences"
android:selectAllOnFocus="true" />
</com.google.android.material.textfield.TextInputLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:adjustViewBounds="true"
android:contentDescription="@string/image_photo_marker"
android:scaleType="fitStart" />
android:layout_marginTop="16dp">
<ImageView
android:id="@+id/marker_edit_photo_delete"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_margin="16dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/shape_circle_darkgray"
android:padding="4dp"
android:src="@drawable/ic_delete_forever_24dp" />
</RelativeLayout>
<ImageView
android:id="@+id/marker_edit_photo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:adjustViewBounds="true"
android:contentDescription="@string/image_photo_marker"
android:scaleType="fitStart" />
<ImageView
android:id="@+id/marker_edit_photo_delete"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_margin="16dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/shape_circle_darkgray"
android:padding="4dp"
android:src="@drawable/ic_delete_forever_24dp" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
<View style="@style/BottomButtonDivider" />
<LinearLayout style="@style/BottomButtonBar">
<Button
android:id="@+id/marker_edit_cancel"
style="@style/BottomButton"
android:layout_gravity="start"
android:text="@android:string/cancel" />
<Button
android:id="@+id/marker_edit_done"
style="@style/BottomButton"
android:layout_gravity="end" />
</LinearLayout>
</ScrollView>
<View style="@style/BottomButtonDivider" />
<LinearLayout style="@style/BottomButtonBar">
<Button
android:id="@+id/marker_edit_cancel"
style="@style/BottomButton"
android:layout_gravity="start"
android:text="@android:string/cancel" />
<Button
android:id="@+id/marker_edit_done"
style="@style/BottomButton"
android:layout_gravity="end" />
</LinearLayout>
</LinearLayout>
<include android:id="@+id/bottom_app_bar_layout" layout="@layout/bottomappbar" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+23 -16
View File
@@ -13,24 +13,31 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="match_parent">
<include layout="@layout/toolbar" />
<ListView
android:id="@+id/marker_list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<TextView
android:id="@+id/marker_list_empty"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
style="?attr/textAppearanceHeadline4"
android:gravity="center_horizontal|center_vertical"
android:text="@string/marker_list_empty_message" />
android:orientation="vertical"
android:paddingBottom="50dp">
</LinearLayout>
<ListView
android:id="@+id/marker_list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<TextView
android:id="@+id/marker_list_empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="?attr/textAppearanceHeadline4"
android:gravity="center_horizontal|center_vertical"
android:text="@string/marker_list_empty_message" />
</LinearLayout>
<include android:id="@+id/bottom_app_bar_layout" layout="@layout/bottomappbar" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+17 -9
View File
@@ -1,14 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="match_parent">
<include layout="@layout/toolbar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="50dp">
<FrameLayout
android:id="@+id/settings_fragment"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@+id/settings_fragment"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
<include android:id="@+id/bottom_app_bar_layout" layout="@layout/bottomappbar" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
-9
View File
@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
style="@style/Widget.MaterialComponents.Toolbar.Surface"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</merge>
+26 -96
View File
@@ -13,109 +13,39 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical">
android:layout_height="match_parent">
<include layout="@layout/toolbar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="60dp">
<ScrollView style="@style/ScrollView.WithBottomButtons">
<include
android:id="@+id/fields"
layout="@layout/track_edit_fields" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp">
<View style="@style/BottomButtonDivider" />
<com.google.android.material.textfield.TextInputLayout
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">
<LinearLayout style="@style/BottomButtonBar">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/track_edit_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textCapWords"
android:selectAllOnFocus="true" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<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>
<Button
android:id="@+id/track_edit_cancel"
style="@style/BottomButton"
android:layout_gravity="start"
android:text="@android:string/cancel" />
<Button
android:id="@+id/track_edit_save"
style="@style/BottomButton"
android:layout_gravity="end"
android:text="@string/generic_save" />
</LinearLayout>
</ScrollView>
<View style="@style/BottomButtonDivider" />
<LinearLayout style="@style/BottomButtonBar">
<Button
android:id="@+id/track_edit_cancel"
style="@style/BottomButton"
android:layout_gravity="start"
android:text="@android:string/cancel" />
<Button
android:id="@+id/track_edit_save"
style="@style/BottomButton"
android:layout_gravity="end"
android:text="@string/generic_save" />
</LinearLayout>
</LinearLayout>
<include android:id="@+id/bottom_app_bar_layout" layout="@layout/bottomappbar" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+84
View File
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
style="@style/ScrollView.WithBottomButtons">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp">
<com.google.android.material.textfield.TextInputLayout
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="textCapWords"
android:selectAllOnFocus="true" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<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>
</LinearLayout>
</ScrollView>
+78 -63
View File
@@ -13,79 +13,94 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
xmlns:app="http://schemas.android.com/apk/res-auto">
<include layout="@layout/toolbar" />
<ListView
android:id="@+id/track_list"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0" />
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="50dp"
android:clipToPadding="false">
<RelativeLayout
android:id="@+id/track_list_empty_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0">
<LinearLayout
android:id="@+id/track_list_arrow_long"
<ListView
android:id="@+id/track_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:paddingTop="16dp"
android:paddingBottom="12dp">
android:layout_height="0dp"
android:layout_weight="0.8" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="10"
android:contentDescription="@string/image_arrow"
android:src="@drawable/ic_arrow_long" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="17" />
</LinearLayout>
<LinearLayout
<RelativeLayout
android:id="@+id/track_list_empty_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/track_list_arrow_long">
android:layout_height="0dp"
android:layout_weight="1.2">
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="5" />
<TextView
style="?attr/textAppearanceHeadline6"
android:layout_width="0dp"
<LinearLayout
android:id="@+id/track_list_arrow_long"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="22"
android:gravity="start"
android:text="@string/track_list_empty_message" />
android:layout_alignParentBottom="true"
android:paddingTop="16dp"
android:paddingBottom="12dp">
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
</RelativeLayout>
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.7" />
<androidx.fragment.app.FragmentContainerView
android:id="@+id/controller_fragment"
android:name="de.dennisguse.opentracks.ControllerFragment"
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.3"
android:paddingBottom="50dp"
android:contentDescription="@string/image_arrow"
android:src="@drawable/ic_arrow_long" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/track_list_arrow_long">
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.3" />
<TextView
style="?attr/textAppearanceHeadline6"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:gravity="right"
android:text="@string/track_list_empty_message" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.3" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/bottom_app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:fabAlignmentMode="end"
app:logo="@drawable/ic_logo_color_24dp"
app:menu="@menu/track_list" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/track_list_fab_action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_baseline_record_24"
app:layout_anchor="@id/bottom_app_bar" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+22 -14
View File
@@ -13,21 +13,29 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="match_parent">
<include layout="@layout/toolbar" />
<com.google.android.material.tabs.TabLayout
android:id="@+id/track_detail_activity_tablayout"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="70dp">
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/track_detail_activity_view_pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
<com.google.android.material.tabs.TabLayout
android:id="@+id/track_detail_activity_tablayout"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/track_detail_activity_view_pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
<include android:id="@+id/bottom_app_bar_layout" layout="@layout/bottomappbar" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+38 -23
View File
@@ -1,35 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
xmlns:app="http://schemas.android.com/apk/res-auto">
<include layout="@layout/toolbar" />
<com.google.android.material.tabs.TabLayout
android:id="@+id/track_detail_activity_tablayout"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="90dp">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/track_recording_coordinator_layout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/track_detail_activity_view_pager"
<com.google.android.material.tabs.TabLayout
android:id="@+id/track_detail_activity_tablayout"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="wrap_content" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/track_recording_coordinator_layout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.fragment.app.FragmentContainerView
android:id="@+id/controller_fragment"
android:name="de.dennisguse.opentracks.ControllerFragment"
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/track_detail_activity_view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>
<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/bottom_app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:fabAlignmentMode="end"
app:navigationIcon="@drawable/ic_logo_color_24dp"
app:menu="@menu/track_record" />
</LinearLayout>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/track_recording_fab_action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_baseline_record_24"
app:layout_anchor="@id/bottom_app_bar" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+116
View File
@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical">
<include
android:id="@+id/fields"
layout="@layout/track_edit_fields" />
<LinearLayout style="@style/BottomButtonBar">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
<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"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline2"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="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.Barrier
android:id="@+id/stats_summary_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="time,distance,speed" />
<ImageView
android:id="@+id/resume_button"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_marginTop="48dp"
app:srcCompat="@drawable/ic_button_resume"
app:layout_constraintTop_toBottomOf="@id/stats_summary_barrier"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/finish_button"
app:layout_constraintBottom_toBottomOf="parent" />
<ImageView
android:id="@+id/finish_button"
android:layout_width="64dp"
android:layout_height="64dp"
app:srcCompat="@drawable/ic_button_done"
app:layout_constraintTop_toTopOf="@id/resume_button"
app:layout_constraintStart_toEndOf="@id/resume_button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="@id/resume_button" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</LinearLayout>
+20 -2
View File
@@ -11,8 +11,6 @@
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<item name="windowActionModeOverlay">true</item>
<item name="android:colorBackground">@android:color/black</item>
<item name="colorOnBackground">@android:color/white</item>
@@ -20,6 +18,26 @@
<item name="colorOnSurface">@color/opentracks_surface_night_on_background_color</item>
<item name="android:activatedBackgroundIndicator">@drawable/activated_background</item>
<item name="bottomAppBarStyle">@style/Widget.OpenTracks.BottomAppBar</item>
<item name="floatingActionButtonStyle">@style/Widget.OpenTracks.FloatingActionButton</item>
<item name="android:windowActionModeOverlay">true</item>
</style>
<style name="Widget.OpenTracks.BottomAppBar" parent="Widget.MaterialComponents.BottomAppBar.Colored">
<item name="materialThemeOverlay">@style/ThemeOverlay.OpenTracks.BottomAppBar</item>
</style>
<style name="ThemeOverlay.OpenTracks.BottomAppBar" parent="">
<item name="colorPrimary">@android:color/black</item>
<item name="colorOnPrimary">@android:color/white</item>
</style>
<style name="Widget.OpenTracks.FloatingActionButton" parent="Widget.MaterialComponents.FloatingActionButton">
<item name="fabCustomSize">64dp</item>
</style>
</resources>
+2 -2
View File
@@ -18,8 +18,8 @@ limitations under the License.
<color name="opentracks_primary_color">#344955</color>
<color name="opentracks_primary_variant_color">#232f34</color>
<color name="opentracks_on_primary_color">@android:color/white</color>
<color name="opentracks_secondary_color">#ff8800</color>
<color name="opentracks_secondary_transparent">#55ff8800</color>
<color name="opentracks_secondary_color">#FF6D00</color>
<color name="opentracks_secondary_transparent">#55FF6D00</color>
<color name="opentracks_on_secondary_color">@android:color/white</color>
<color name="opentracks_surface_day_background_color">#f5f5f5</color>
+1 -6
View File
@@ -15,12 +15,7 @@ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- toolbar -->
<style name="Widget.OpenTracks.Toolbar.Surface" parent="Widget.MaterialComponents.Toolbar.Surface">
<item name="android:background">#ff0000</item>
</style>
<!-- bottom bar -->
<!-- bottom buttons bar -->
<style name="BottomButton" parent="Widget.MaterialComponents.Button.TextButton">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">1</item>
+14 -2
View File
@@ -29,8 +29,6 @@ limitations under the License.
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<item name="windowActionModeOverlay">true</item>
<item name="android:colorBackground">@android:color/white</item>
<item name="colorOnBackground">@android:color/black</item>
@@ -46,6 +44,15 @@ limitations under the License.
<!-- Linear progress indicator -->
<item name="linearProgressIndicatorStyle">@style/OpenTracksLinearProgressIndicator</item>
<!-- Bottom bar -->
<item name="bottomAppBarStyle">@style/Widget.MaterialComponents.BottomAppBar.Colored</item>
<!-- Floating buttons -->
<item name="floatingActionButtonStyle">@style/Widget.OpenTracks.FloatingActionButton</item>
<item name="android:windowActionModeOverlay">true</item>
</style>
<style name="OpenTracksLinearProgressIndicator" parent="Widget.MaterialComponents.LinearProgressIndicator">
@@ -57,4 +64,9 @@ limitations under the License.
<item name="android:navigationBarColor">@color/splashscreen_background</item>
<item name="android:windowBackground">@drawable/splashscreen</item>
</style>
<style name="Widget.OpenTracks.FloatingActionButton" parent="Widget.MaterialComponents.FloatingActionButton">
<item name="fabCustomSize">64dp</item>
</style>
</resources>
+5
View File
@@ -52,4 +52,9 @@
<item name="android:textColor">?attr/colorOnBackground</item>
<item name="android:singleLine">true</item>
</style>
<style name="TextAppearance.OpenTracks.OnBottomBarText" parent="TextAppearance.MaterialComponents.Headline6">
<item name="android:textColor">?attr/colorOnPrimary</item>
<item name="android:singleLine">true</item>
</style>
</resources>