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
+114 -32
View File
@@ -1,37 +1,119 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:cc="http://creativecommons.org/ns#" <svg xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
enable-background="new 0 0 95.334 100" xmlns:svg="http://www.w3.org/2000/svg"
height="100" xmlns="http://www.w3.org/2000/svg"
id="Ebene_1" xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
viewBox="0 0 100 100" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="100" enable-background="new 0 0 95.334 100"
x="0px" height="100"
xmlns="http://www.w3.org/2000/svg" id="Ebene_1"
y="0px" version="1.1"
xml:space="preserve"><metadata 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 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> rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
<defs id="defs14" /> rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata>
<g id="g9" <defs
transform="translate(-1.0593197,1.9067775)"> id="defs14"><linearGradient
<linearGradient gradientUnits="userSpaceOnUse" inkscape:collect="always"
id="SVGID_1_" id="linearGradient862"><stop
x1="28.7554" style="stop-color:#ff6d00;stop-opacity:1;"
x2="82.789497" offset="0"
y1="81.535202" id="stop858" /><stop
y2="9.2979002"> style="stop-color:#ff6d00;stop-opacity:0;"
<stop style="stop-color:#FBB22F" offset="1"
id="stop2" id="stop860" /></linearGradient><linearGradient
offset="0" /> gradientUnits="userSpaceOnUse"
<stop style="stop-color:#F58820" id="SVGID_1_"
id="stop4" x1="28.7554"
offset="1" /> 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> </linearGradient>
<path style="fill:url(#SVGID_1_)" <path
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" style="fill:url(#linearGradient866);fill-opacity:1"
id="path7" /> 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> </g>
</svg> </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 // TrackListActivity: start recording
ViewInteraction trackControllerRecordButton = onView(withId(R.id.controller_record)); ViewInteraction trackControllerRecordButton = onView(withId(R.id.track_list_fab_action));
trackControllerRecordButton.perform(click()); trackControllerRecordButton.perform(click());
} }
{ {
// TrackRecordingActivity // TrackRecordingActivity
ViewInteraction trackControllerRecordButton = onView(withId(R.id.controller_record)); ViewInteraction trackControllerStopButton = onView(withId(R.id.track_recording_fab_action));
ViewInteraction trackControllerStopButton = onView(withId(R.id.controller_stop));
// wait; stay recording // wait; stay recording
trackControllerRecordButton.perform(waitFor(5000)); trackControllerStopButton.perform(waitFor(5000));
// stop; // stop;
trackControllerStopButton.perform(veryLongTouch(1600)); trackControllerStopButton.perform(veryLongTouch(1600));
@@ -108,7 +107,7 @@ public class EspressoDeleteTrackTest {
allOf(withContentDescription("More options"), allOf(withContentDescription("More options"),
childAtPosition( childAtPosition(
childAtPosition( childAtPosition(
withId(R.id.toolbar), withId(R.id.bottom_app_bar),
2), 2),
2), 2),
isDisplayed())); isDisplayed()));
@@ -50,16 +50,15 @@ public class EspressoEditTrackRecordingTest {
public void espressoEditTrackRecordingTest() { public void espressoEditTrackRecordingTest() {
{ {
// TrackListActivity: start recording // TrackListActivity: start recording
ViewInteraction trackControllerRecordButton = onView(withId(R.id.controller_record)); ViewInteraction fabRecordButton = onView(withId(R.id.track_list_fab_action));
trackControllerRecordButton.perform(click()); fabRecordButton.perform(click());
} }
{ {
// TrackRecordingActivity // TrackRecordingActivity
ViewInteraction trackControllerRecordButton = onView(withId(R.id.controller_record)); ViewInteraction trackControllerStopButton = onView(withId(R.id.track_recording_fab_action));
ViewInteraction trackControllerStopButton = onView(withId(R.id.controller_stop));
// wait; stay recording // wait; stay recording
trackControllerRecordButton.perform(waitFor(15000)); trackControllerStopButton.perform(waitFor(15000));
// open menu // open menu
openContextualActionModeOverflowMenu(); openContextualActionModeOverflowMenu();
@@ -88,37 +87,17 @@ public class EspressoEditTrackRecordingTest {
textInputEditText2.perform(closeSoftKeyboard()); textInputEditText2.perform(closeSoftKeyboard());
// save edition // save edition
ViewInteraction appCompatButton = onView( ViewInteraction appCompatButton = onView(withId(R.id.track_edit_save));
allOf(withId(R.id.track_edit_save),
childAtPosition(
childAtPosition(
withClassName(is("android.widget.LinearLayout")),
3),
1),
isDisplayed()));
appCompatButton.perform(click()); 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; // stop;
trackControllerStopButton.perform(veryLongTouch(1600)); trackControllerStopButton.perform(veryLongTouch(1600));
// check track's name is "New Name" // it's on track stopped activity and there are two buttons
ViewInteraction textView = onView( ViewInteraction resumeButton = onView(withId(R.id.resume_button));
allOf(withId(R.id.stats_name_value), resumeButton.check(matches(isDisplayed()));
withParent(withParent(IsInstanceOf.instanceOf(android.widget.ScrollView.class))), ViewInteraction finishButton = onView(withId(R.id.finish_button));
isDisplayed())); finishButton.check(matches(isDisplayed()));
textView.check(matches(withText("New Name")));
} }
} }
@@ -42,28 +42,27 @@ public class EspressoUITest {
public void record_pause_resume_stop() { public void record_pause_resume_stop() {
{ {
// TrackListActivity: start recording // TrackListActivity: start recording
ViewInteraction trackControllerRecordButton = onView(withId(R.id.controller_record)); ViewInteraction trackControllerRecordButton = onView(withId(R.id.track_list_fab_action));
trackControllerRecordButton.perform(click()); trackControllerRecordButton.perform(click());
} }
{ {
// TrackRecordingActivity // TrackRecordingActivity
ViewInteraction trackControllerRecordButton = onView(withId(R.id.controller_record)); ViewInteraction trackControllerStopButton = onView(withId(R.id.track_recording_fab_action));
ViewInteraction trackControllerStopButton = onView(withId(R.id.controller_stop));
// wait; stay recording // // wait; stay recording
trackControllerRecordButton.perform(waitFor(5000)); // trackControllerRecordButton.perform(waitFor(5000));
//
//pause // //pause
trackControllerRecordButton.perform(veryLongTouch(1600)); // trackControllerRecordButton.perform(veryLongTouch(1600));
//
// wait; stay paused // // wait; stay paused
trackControllerRecordButton.perform(waitFor(1000)); // trackControllerRecordButton.perform(waitFor(1000));
//
// resume // // resume
trackControllerRecordButton.perform(click()); // trackControllerRecordButton.perform(click());
//
// wait; stay recording // // wait; stay recording
trackControllerRecordButton.perform(waitFor(1000)); // trackControllerRecordButton.perform(waitFor(1000));
// stop; // stop;
trackControllerStopButton.perform(veryLongTouch(1600)); trackControllerStopButton.perform(veryLongTouch(1600));
@@ -75,13 +74,13 @@ public class EspressoUITest {
public void record_move_through_tabs() { public void record_move_through_tabs() {
{ {
// TrackListActivity: start recording // TrackListActivity: start recording
ViewInteraction trackControllerRecordButton = onView(withId(R.id.controller_record)); ViewInteraction trackControllerRecordButton = onView(withId(R.id.track_list_fab_action));
trackControllerRecordButton.perform(click()); trackControllerRecordButton.perform(click());
} }
{ {
// TrackRecordingActivity // TrackRecordingActivity
ViewInteraction tabLayout = onView(withId(R.id.track_detail_activity_tablayout)); 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(selectTabAtIndex(1));
tabLayout.perform(waitFor(1000)); tabLayout.perform(waitFor(1000));
@@ -59,13 +59,13 @@ public class EspressoAggregatedFilterTest {
@Test @Test
public void espressoAggregatedFilterTest() { public void espressoAggregatedFilterTest() {
// open AggregatedStatisticsActivity through toolbar's menu item // open AggregatedStatisticsActivity through toolbar's menu item
onView(ViewMatchers.withId(R.id.toolbar)).check(matches(isDisplayed())); onView(ViewMatchers.withId(R.id.bottom_app_bar)).check(matches(isDisplayed()));
onView(withId(R.id.toolbar)).check(matches(hasDescendant(withId(R.id.track_list_aggregated_stats)))); 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()); onView(withId(R.id.track_list_aggregated_stats)).perform(click());
// open FilterDialogFragment through toolbar's menu item // open FilterDialogFragment through toolbar's menu item
onView(withId(R.id.toolbar)).check(matches(isDisplayed())); onView(withId(R.id.bottom_app_bar)).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(hasDescendant(withId(R.id.aggregated_statistics_filter))));
onView(withId(R.id.aggregated_statistics_filter)).perform(click()); onView(withId(R.id.aggregated_statistics_filter)).perform(click());
// check there's a checkbox with CATEGORY text // check there's a checkbox with CATEGORY text
@@ -41,7 +41,7 @@ public class EspressoCustomLayoutTest {
@Test @Test
public void customLayoutTest() { public void customLayoutTest() {
// TrackListActivity: start recording // 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()); trackControllerRecordButton.perform(click());
// Get custom layout preferences and check all data fields are showed. // 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())); onView(withId(R.id.stats_recycler_view)).check(new RecyclerViewItemCountAssertion((int) layout.getFields().stream().filter(DataField::isVisible).count()));
// stop recording // stop recording
ViewInteraction trackControllerStopButton = onView(withId(R.id.controller_stop)); ViewInteraction trackControllerStopButton = onView(withId(R.id.track_recording_fab_action));
trackControllerStopButton.perform(veryLongTouch(1600)); trackControllerStopButton.perform(veryLongTouch(1600));
} }
+1
View File
@@ -324,6 +324,7 @@ limitations under the License.
</activity> </activity>
<activity android:name=".TrackRecordedActivity" /> <activity android:name=".TrackRecordedActivity" />
<activity android:name=".TrackStoppedActivity" />
<activity <activity
android:name=".TrackRecordingActivity" 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.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))); 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)); ViewUtils.makeClickableLinks(findViewById(android.R.id.content));
} }
@@ -19,9 +19,7 @@ package de.dennisguse.opentracks;
import android.os.Bundle; import android.os.Bundle;
import android.view.View; import android.view.View;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import de.dennisguse.opentracks.services.announcement.VoiceAnnouncement; import de.dennisguse.opentracks.services.announcement.VoiceAnnouncement;
@@ -38,9 +36,6 @@ public abstract class AbstractActivity extends AppCompatActivity {
setVolumeControlStream(VoiceAnnouncement.AUDIO_STREAM); setVolumeControlStream(VoiceAnnouncement.AUDIO_STREAM);
setContentView(getRootView()); setContentView(getRootView());
Toolbar toolbar = findViewById(R.id.toolbar);
setupActionBarBack(toolbar);
} }
@Override @Override
@@ -50,12 +45,4 @@ public abstract class AbstractActivity extends AppCompatActivity {
} }
protected abstract View getRootView(); 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 { public class HelpActivity extends AbstractActivity {
private HelpBinding helpBinding;
@Override @Override
public void onCreate(@Nullable Bundle savedInstanceState) { public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setSupportActionBar(helpBinding.bottomAppBarLayout.bottomAppBar);
ViewUtils.makeClickableLinks(findViewById(android.R.id.content)); ViewUtils.makeClickableLinks(findViewById(android.R.id.content));
} }
@Override @Override
protected View getRootView() { 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; 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); ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.activity_types, android.R.layout.simple_dropdown_item_1line);
viewBinding.trackEditActivityType.setAdapter(adapter); viewBinding.fields.trackEditActivityType.setAdapter(adapter);
viewBinding.trackEditActivityType.setOnItemClickListener((parent, view, position, id) -> setActivityTypeIcon(TrackIconUtils.getIconValue(this, (String) viewBinding.trackEditActivityType.getAdapter().getItem(position)))); viewBinding.fields.trackEditActivityType.setOnItemClickListener((parent, view, position, id) -> setActivityTypeIcon(TrackIconUtils.getIconValue(this, (String) viewBinding.fields.trackEditActivityType.getAdapter().getItem(position))));
viewBinding.trackEditActivityType.setOnFocusChangeListener((v, hasFocus) -> { viewBinding.fields.trackEditActivityType.setOnFocusChangeListener((v, hasFocus) -> {
if (!hasFocus) { if (!hasFocus) {
setActivityTypeIcon(TrackIconUtils.getIconValue( 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); 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 -> { viewBinding.trackEditSave.setOnClickListener(v -> {
TrackUtils.updateTrack(TrackEditActivity.this, track, viewBinding.trackEditName.getText().toString(), TrackUtils.updateTrack(TrackEditActivity.this, track, viewBinding.fields.trackEditName.getText().toString(),
viewBinding.trackEditActivityType.getText().toString(), viewBinding.trackEditDescription.getText().toString(), viewBinding.fields.trackEditActivityType.getText().toString(), viewBinding.fields.trackEditDescription.getText().toString(),
contentProviderUtils); contentProviderUtils);
finish(); finish();
}); });
setTitle(R.string.menu_edit);
viewBinding.trackEditCancel.setOnClickListener(v -> finish()); viewBinding.trackEditCancel.setOnClickListener(v -> finish());
viewBinding.trackEditCancel.setVisibility(View.VISIBLE); viewBinding.trackEditCancel.setVisibility(View.VISIBLE);
}
viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(getString(R.string.menu_edit));
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
}
@Override @Override
protected void onStart() { protected void onStart() {
@@ -137,12 +138,12 @@ public class TrackEditActivity extends AbstractActivity implements ChooseActivit
private void setActivityTypeIcon(String iconValue) { private void setActivityTypeIcon(String iconValue) {
this.iconValue = iconValue; this.iconValue = iconValue;
viewBinding.trackEditActivityTypeIcon.setImageResource(TrackIconUtils.getIconDrawable(iconValue)); viewBinding.fields.trackEditActivityTypeIcon.setImageResource(TrackIconUtils.getIconDrawable(iconValue));
} }
@Override @Override
public void onChooseActivityTypeDone(String value) { public void onChooseActivityTypeDone(String value) {
setActivityTypeIcon(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.Intent;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener; import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.database.Cursor; import android.database.Cursor;
import android.graphics.Color;
import android.graphics.drawable.AnimatedVectorDrawable; import android.graphics.drawable.AnimatedVectorDrawable;
import android.location.LocationManager; import android.location.LocationManager;
import android.os.Bundle; import android.os.Bundle;
import android.os.Vibrator;
import android.provider.Settings; import android.provider.Settings;
import android.util.Pair; import android.util.Pair;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.widget.SearchView; import androidx.appcompat.widget.SearchView;
import androidx.appcompat.widget.Toolbar; import androidx.core.content.ContextCompat;
import androidx.cursoradapter.widget.ResourceCursorAdapter; import androidx.cursoradapter.widget.ResourceCursorAdapter;
import androidx.loader.app.LoaderManager; import androidx.loader.app.LoaderManager;
import androidx.loader.content.CursorLoader; import androidx.loader.content.CursorLoader;
@@ -76,7 +79,7 @@ import de.dennisguse.opentracks.util.TrackIconUtils;
* *
* @author Leif Hendrik Wilden * @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(); 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) { public void onPrepare(Menu menu, int[] positions, long[] trackIds, boolean showSelectAll) {
boolean isSingleSelection = trackIds.length == 1; 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_edit).setVisible(isSingleSelection);
menu.findItem(R.id.list_context_menu_select_all).setVisible(showSelectAll); 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) { public boolean onClick(int itemId, int[] positions, long[] trackIds) {
return handleContextItem(itemId, trackIds); return handleContextItem(itemId, trackIds);
} }
@Override
public void onDestroy() {
viewBinding.trackListFabAction.setVisibility(View.VISIBLE);
viewBinding.bottomAppBar.performShow(true);
}
}; };
private final OnSharedPreferenceChangeListener sharedPreferenceChangeListener = (sharedPreferences, key) -> { 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 category = icon != null && !icon.equals("") ? null : cursor.getString(categoryIndex);
String description = cursor.getString(descriptionIndex); 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, iconId, R.string.image_track, name, totalTime, totalDistance, markerCount,
OffsetDateTime.ofInstant(Instant.ofEpochMilli(startTime), ZoneOffset.ofTotalSeconds(startTimeOffset)), OffsetDateTime.ofInstant(Instant.ofEpochMilli(startTime), ZoneOffset.ofTotalSeconds(startTimeOffset)),
category, description, false); category, description, false);
@@ -210,13 +222,34 @@ public class TrackListActivity extends AbstractTrackDeleteActivity implements Co
viewBinding.trackList.setAdapter(resourceCursorAdapter); viewBinding.trackList.setAdapter(resourceCursorAdapter);
ActivityUtils.configureListViewContextualMenu(viewBinding.trackList, contextualActionModeCallback); 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 // Not Recording -> Recording
protected void setupActionBarBack(Toolbar toolbar) { updateGpsMenuItem(false, true);
setSupportActionBar(toolbar); Intent newIntent = IntentUtils.newIntent(TrackListActivity.this, TrackRecordingActivity.class);
toolbar.setNavigationIcon(R.drawable.ic_logo_color_24dp); 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 @Override
@@ -234,6 +267,9 @@ public class TrackListActivity extends AbstractTrackDeleteActivity implements Co
// Update UI // Update UI
this.invalidateOptionsMenu(); this.invalidateOptionsMenu();
LoaderManager.getInstance(this).restartLoader(0, null, loaderCallbacks); LoaderManager.getInstance(this).restartLoader(0, null, loaderCallbacks);
// Float button
setFloatButton();
} }
@Override @Override
@@ -263,6 +299,13 @@ public class TrackListActivity extends AbstractTrackDeleteActivity implements Co
searchMenuItem = menu.findItem(R.id.track_list_search); searchMenuItem = menu.findItem(R.id.track_list_search);
SearchView searchView = ActivityUtils.configureSearchWidget(this, searchMenuItem); 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.setOnCloseListener(() -> {
searchView.clearFocus(); searchView.clearFocus();
searchMenuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); 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) { public void onGpsStatusChanged(GpsStatusValue newStatus) {
gpsStatusValue = newStatus; gpsStatusValue = newStatus;
updateGpsMenuItem(true, recordingStatus.isRecording()); 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) { private void onRecordingStatusChanged(RecordingStatus status) {
recordingStatus = status; recordingStatus = status;
setFloatButton();
} }
} }
@@ -102,6 +102,11 @@ public class TrackRecordedActivity extends AbstractTrackDeleteActivity implement
trackRecordingServiceConnection = new TrackRecordingServiceConnection(bindCallback); 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(); postponeEnterTransition();
} }
@@ -162,8 +167,6 @@ public class TrackRecordedActivity extends AbstractTrackDeleteActivity implement
public boolean onPrepareOptionsMenu(Menu menu) { 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_markers).setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menu.findItem(R.id.track_detail_resume_track).setVisible(!recordingStatus.isRecording()); 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); return super.onPrepareOptionsMenu(menu);
} }
@@ -246,7 +249,7 @@ public class TrackRecordedActivity extends AbstractTrackDeleteActivity implement
private void handleIntent(Intent intent) { private void handleIntent(Intent intent) {
trackId = intent.getParcelableExtra(EXTRA_TRACK_ID); trackId = intent.getParcelableExtra(EXTRA_TRACK_ID);
if (trackId == null) { if (trackId == null) {
Log.e(TAG, "TrackDetailActivity needs EXTRA_TRACK_ID."); Log.e(TAG, TrackRecordedActivity.class.getSimpleName() + " needs EXTRA_TRACK_ID.");
finish(); finish();
} }
} }
@@ -2,10 +2,12 @@ package de.dennisguse.opentracks;
import android.Manifest; import android.Manifest;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener; import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Vibrator;
import android.util.Log; import android.util.Log;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
@@ -16,6 +18,7 @@ import android.widget.Toast;
import androidx.activity.result.ActivityResultLauncher; import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts; import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentActivity;
import androidx.viewpager2.adapter.FragmentStateAdapter; 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. //NOTE: This activity does NOT react to preference changes of R.string.recording_track_id_key.
//This mode of communication should be removed anyhow. //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"; 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 runOnUiThread(TrackRecordingActivity.this::invalidateOptionsMenu); //TODO Should not be necessary
}; };
private MenuItem insertMarkerMenuItem;
private MenuItem markerListMenuItem;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@@ -148,6 +148,26 @@ public class TrackRecordingActivity extends AbstractActivity implements ChooseAc
} }
requestGPSPermissions(); 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 @Override
@@ -247,19 +267,9 @@ public class TrackRecordingActivity extends AbstractActivity implements ChooseAc
@Override @Override
public boolean onCreateOptionsMenu(Menu menu) { public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.track_record, 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); return super.onCreateOptionsMenu(menu);
} }
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
updateMenuItems(recordingStatus.isPaused());
return super.onPrepareOptionsMenu(menu);
}
@Override @Override
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == R.id.track_detail_menu_show_on_map) { if (item.getItemId() == R.id.track_detail_menu_show_on_map) {
@@ -315,15 +325,6 @@ public class TrackRecordingActivity extends AbstractActivity implements ChooseAc
return trackDataHub; 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 @Override
public void onChooseActivityTypeDone(String iconValue) { public void onChooseActivityTypeDone(String iconValue) {
Track track = contentProviderUtils.getTrack(trackId); Track track = contentProviderUtils.getTrack(trackId);
@@ -331,29 +332,6 @@ public class TrackRecordingActivity extends AbstractActivity implements ChooseAc
TrackUtils.updateTrack(this, track, null, category, null, contentProviderUtils); 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 { private class CustomFragmentPagerAdapter extends FragmentStateAdapter {
public CustomFragmentPagerAdapter(@NonNull FragmentActivity fa) { 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.models.Track;
import de.dennisguse.opentracks.data.tables.TracksColumns; import de.dennisguse.opentracks.data.tables.TracksColumns;
import de.dennisguse.opentracks.databinding.ExportActivityBinding; 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.ErrorListDialog;
import de.dennisguse.opentracks.io.file.TrackFileFormat; import de.dennisguse.opentracks.io.file.TrackFileFormat;
import de.dennisguse.opentracks.util.ExportUtils; import de.dennisguse.opentracks.util.ExportUtils;
@@ -135,7 +134,6 @@ public class ExportActivity extends FragmentActivity implements ExportServiceRes
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
viewBinding = ExportActivityBinding.inflate(getLayoutInflater()); viewBinding = ExportActivityBinding.inflate(getLayoutInflater());
ToolbarBinding mergedBinding = ToolbarBinding.bind(viewBinding.getRoot());
setContentView(viewBinding.getRoot()); setContentView(viewBinding.getRoot());
directoryUri = getIntent().getParcelableExtra(EXTRA_DIRECTORY_URI_KEY); directoryUri = getIntent().getParcelableExtra(EXTRA_DIRECTORY_URI_KEY);
@@ -146,8 +144,6 @@ public class ExportActivity extends FragmentActivity implements ExportServiceRes
DocumentFile documentFile = DocumentFile.fromTreeUri(this, directoryUri); DocumentFile documentFile = DocumentFile.fromTreeUri(this, directoryUri);
String directoryDisplayName = FileUtils.getPath(documentFile); String directoryDisplayName = FileUtils.getPath(documentFile);
mergedBinding.toolbar.setTitle(getString(R.string.export_progress_message, directoryDisplayName));
resultReceiver = new ExportServiceResultReceiver(new Handler(), this); resultReceiver = new ExportServiceResultReceiver(new Handler(), this);
if (savedInstanceState == null) { if (savedInstanceState == null) {
@@ -170,6 +166,9 @@ public class ExportActivity extends FragmentActivity implements ExportServiceRes
setProgress(); setProgress();
initExport(getTotalDone()); initExport(getTotalDone());
} }
viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(getString(R.string.export_progress_message, directoryDisplayName));
viewBinding.bottomAppBarLayout.bottomAppBar.setNavigationIcon(R.drawable.ic_logo_color_24dp);
} }
@Override @Override
@@ -25,7 +25,6 @@ import android.view.View;
import android.widget.Toast; import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import androidx.documentfile.provider.DocumentFile; import androidx.documentfile.provider.DocumentFile;
import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentActivity;
@@ -71,8 +70,6 @@ public class ImportActivity extends FragmentActivity {
viewBinding = ImportActivityBinding.inflate(getLayoutInflater()); viewBinding = ImportActivityBinding.inflate(getLayoutInflater());
setContentView(viewBinding.getRoot()); setContentView(viewBinding.getRoot());
Toolbar toolbar = findViewById(R.id.toolbar);
final Intent intent = getIntent(); final Intent intent = getIntent();
final ClipData intentClipData = intent.getClipData(); 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()); 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(); initViews();
viewModel = new ViewModelProvider(this).get(ImportViewModel.class); viewModel = new ViewModelProvider(this).get(ImportViewModel.class);
@@ -116,6 +110,10 @@ public class ImportActivity extends FragmentActivity {
summary = data; summary = data;
setProgress(); 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 @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.EGM2008CorrectionManager;
import de.dennisguse.opentracks.services.handlers.GpsStatusValue; import de.dennisguse.opentracks.services.handlers.GpsStatusValue;
import de.dennisguse.opentracks.services.handlers.TrackPointCreator; import de.dennisguse.opentracks.services.handlers.TrackPointCreator;
import de.dennisguse.opentracks.util.ExportUtils;
import de.dennisguse.opentracks.util.SystemUtils; import de.dennisguse.opentracks.util.SystemUtils;
public class TrackRecordingService extends Service implements TrackPointCreator.Callback { public class TrackRecordingService extends Service implements TrackPointCreator.Callback {
@@ -235,8 +234,6 @@ public class TrackRecordingService extends Service implements TrackPointCreator.
endRecording(true); endRecording(true);
ExportUtils.postWorkoutExport(this, trackId);
stopSelf(); 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 @Override
public void onResume() { public void onResume() {
super.onResume(); super.onResume();
@@ -10,6 +10,8 @@ import androidx.preference.PreferenceFragmentCompat;
import de.dennisguse.opentracks.AbstractActivity; import de.dennisguse.opentracks.AbstractActivity;
import de.dennisguse.opentracks.R; import de.dennisguse.opentracks.R;
import de.dennisguse.opentracks.databinding.SettingsBinding;
import de.dennisguse.opentracks.databinding.TrackRecordedBinding;
import de.dennisguse.opentracks.fragments.ChooseActivityTypeDialogFragment; import de.dennisguse.opentracks.fragments.ChooseActivityTypeDialogFragment;
public class SettingsActivity extends AbstractActivity implements ChooseActivityTypeDialogFragment.ChooseActivityTypeCaller { public class SettingsActivity extends AbstractActivity implements ChooseActivityTypeDialogFragment.ChooseActivityTypeCaller {
@@ -21,6 +23,8 @@ public class SettingsActivity extends AbstractActivity implements ChooseActivity
private PreferenceFragmentCompat fragment = null; private PreferenceFragmentCompat fragment = null;
private SettingsBinding viewBinding;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@@ -37,6 +41,9 @@ public class SettingsActivity extends AbstractActivity implements ChooseActivity
fragment = new MainSettingsFragment(); 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(); getSupportFragmentManager().beginTransaction().replace(R.id.settings_fragment, fragment).commit();
} }
@@ -66,7 +73,8 @@ public class SettingsActivity extends AbstractActivity implements ChooseActivity
@Override @Override
protected View getRootView() { protected View getRootView() {
return getLayoutInflater().inflate(R.layout.settings, null); viewBinding = SettingsBinding.inflate(getLayoutInflater());
return viewBinding.getRoot();
} }
private PreferenceFragmentCompat getPreferenceScreen(String key) { private PreferenceFragmentCompat getPreferenceScreen(String key) {
@@ -6,7 +6,6 @@ import android.widget.ScrollView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.ItemTouchHelper; import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
@@ -15,12 +14,12 @@ import androidx.recyclerview.widget.RecyclerView;
import java.util.stream.IntStream; import java.util.stream.IntStream;
import de.dennisguse.opentracks.AbstractActivity; import de.dennisguse.opentracks.AbstractActivity;
import de.dennisguse.opentracks.ui.util.ArrayAdapterFilterDisabled;
import de.dennisguse.opentracks.R; import de.dennisguse.opentracks.R;
import de.dennisguse.opentracks.databinding.ActivitySettingsCustomLayoutBinding; import de.dennisguse.opentracks.databinding.ActivitySettingsCustomLayoutBinding;
import de.dennisguse.opentracks.ui.customRecordingLayout.DataField; import de.dennisguse.opentracks.ui.customRecordingLayout.DataField;
import de.dennisguse.opentracks.ui.customRecordingLayout.Layout; import de.dennisguse.opentracks.ui.customRecordingLayout.Layout;
import de.dennisguse.opentracks.ui.customRecordingLayout.SettingsCustomLayoutEditAdapter; import de.dennisguse.opentracks.ui.customRecordingLayout.SettingsCustomLayoutEditAdapter;
import de.dennisguse.opentracks.ui.util.ArrayAdapterFilterDisabled;
import de.dennisguse.opentracks.util.StatisticsUtils; import de.dennisguse.opentracks.util.StatisticsUtils;
public class SettingsCustomLayoutEditActivity extends AbstractActivity implements SettingsCustomLayoutEditAdapter.SettingsCustomLayoutItemClickListener { public class SettingsCustomLayoutEditActivity extends AbstractActivity implements SettingsCustomLayoutEditAdapter.SettingsCustomLayoutItemClickListener {
@@ -97,7 +96,8 @@ public class SettingsCustomLayoutEditActivity extends AbstractActivity implement
recyclerViewNotVisible.setLayoutManager(new LinearLayoutManager(this)); recyclerViewNotVisible.setLayoutManager(new LinearLayoutManager(this));
recyclerViewNotVisible.setAdapter(adapterFieldsHidden); recyclerViewNotVisible.setAdapter(adapterFieldsHidden);
setTitle(profile); viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(profile);
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
} }
@Override @Override
@@ -117,12 +117,6 @@ public class SettingsCustomLayoutEditActivity extends AbstractActivity implement
layoutFieldsVisible = null; layoutFieldsVisible = null;
} }
@Override
protected void setupActionBarBack(Toolbar toolbar) {
super.setupActionBarBack(toolbar);
toolbar.setTitle(R.string.menu_settings);
}
@Override @Override
protected View getRootView() { protected View getRootView() {
viewBinding = ActivitySettingsCustomLayoutBinding.inflate(getLayoutInflater()); viewBinding = ActivitySettingsCustomLayoutBinding.inflate(getLayoutInflater());
@@ -40,8 +40,6 @@ public class SettingsCustomLayoutListActivity extends AbstractActivity implement
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setTitle(getString(R.string.custom_layout_list_title));
adapter = new SettingsCustomLayoutListAdapter(this, this); adapter = new SettingsCustomLayoutListAdapter(this, this);
recyclerView = viewBinding.recyclerView; recyclerView = viewBinding.recyclerView;
recyclerView.setLayoutManager(new LinearLayoutManager(this)); recyclerView.setLayoutManager(new LinearLayoutManager(this));
@@ -114,6 +112,9 @@ public class SettingsCustomLayoutListActivity extends AbstractActivity implement
ItemTouchHelper itemTouchhelper = new ItemTouchHelper(recyclerViewSwipeDeleteCallback); ItemTouchHelper itemTouchhelper = new ItemTouchHelper(recyclerViewSwipeDeleteCallback);
itemTouchhelper.attachToRecyclerView(recyclerView); itemTouchhelper.attachToRecyclerView(recyclerView);
viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(getString(R.string.custom_layout_list_title));
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
} }
@Override @Override
@@ -60,6 +60,9 @@ public class AggregatedStatisticsActivity extends AbstractActivity implements Fi
} }
adapter.notifyDataSetChanged(); adapter.notifyDataSetChanged();
}); });
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(getString(R.string.menu_aggregated_statistics));
} }
@Override @Override
@@ -105,7 +105,7 @@ public class MarkerDetailActivity extends AbstractActivity implements DeleteMark
@Override @Override
public void onPageSelected(int position) { public void onPageSelected(int position) {
setTitle(markerAdapter.getPageTitle(position)); viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(markerAdapter.getPageTitle(position));
} }
@Override @Override
@@ -113,6 +113,8 @@ public class MarkerDetailActivity extends AbstractActivity implements DeleteMark
} }
}); });
viewBinding.makerDetailActivityViewPager.setCurrentItem(markerIndex == -1 ? 0 : markerIndex); viewBinding.makerDetailActivityViewPager.setCurrentItem(markerIndex == -1 ? 0 : markerIndex);
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
} }
@Override @Override
@@ -101,7 +101,7 @@ public class MarkerEditActivity extends AbstractActivity {
}); });
boolean isNewMarker = markerId == null; 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.setText(isNewMarker ? R.string.generic_add : R.string.generic_save);
viewBinding.markerEditDone.setOnClickListener(v -> { viewBinding.markerEditDone.setOnClickListener(v -> {
viewModel.onDone(viewBinding.markerEditName.getText().toString(), viewModel.onDone(viewBinding.markerEditName.getText().toString(),
@@ -150,6 +150,8 @@ public class MarkerEditActivity extends AbstractActivity {
viewBinding.markerEditDescription.getText().toString()); viewBinding.markerEditDescription.getText().toString());
} }
}); });
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
} }
@Override @Override
@@ -80,6 +80,8 @@ public class MarkerListActivity extends AbstractActivity implements DeleteMarker
public void onPrepare(Menu menu, int[] positions, long[] ids, boolean showSelectAll) { public void onPrepare(Menu menu, int[] positions, long[] ids, boolean showSelectAll) {
boolean isSingleSelection = ids.length == 1; 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_show_on_map).setVisible(isSingleSelection);
menu.findItem(R.id.list_context_menu_edit).setVisible(isSingleSelection); menu.findItem(R.id.list_context_menu_edit).setVisible(isSingleSelection);
menu.findItem(R.id.list_context_menu_delete).setVisible(true); 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) { public boolean onClick(int itemId, int[] positions, long[] ids) {
return handleContextItem(itemId, ids); return handleContextItem(itemId, ids);
} }
@Override
public void onDestroy() {
viewBinding.bottomAppBarLayout.bottomAppBar.performShow(true);
}
}; };
private MenuItem insertMarkerMenuItem; private MenuItem insertMarkerMenuItem;
private MenuItem searchMenuItem; private MenuItem searchMenuItem;
@@ -121,6 +128,8 @@ public class MarkerListActivity extends AbstractActivity implements DeleteMarker
ActivityUtils.configureListViewContextualMenu(viewBinding.markerList, contextualActionModeCallback); ActivityUtils.configureListViewContextualMenu(viewBinding.markerList, contextualActionModeCallback);
trackRecordingServiceConnection = new TrackRecordingServiceConnection(bindCallback); trackRecordingServiceConnection = new TrackRecordingServiceConnection(bindCallback);
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
} }
@Override @Override
@@ -301,9 +310,9 @@ public class MarkerListActivity extends AbstractActivity implements DeleteMarker
this.searchQuery = searchQuery; this.searchQuery = searchQuery;
restart(); restart();
if (searchQuery != null) { if (searchQuery != null) {
setTitle(searchQuery); viewBinding.bottomAppBarLayout.bottomAppBarTitle.setText(searchQuery);
} else { } 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); ContentProviderUtils contentProviderUtils = new ContentProviderUtils(context);
Track track = contentProviderUtils.getTrack(new Track.Id(trackId)); 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); OffsetDateTime.ofInstant(Instant.ofEpochMilli(time), track.getZoneOffset()), category, description, hasPhoto);
} }
@@ -45,7 +45,7 @@ public class ActivityUtils {
@Override @Override
public void onDestroyActionMode(ActionMode mode) { public void onDestroyActionMode(ActionMode mode) {
// Do nothing contextualActionModeCallback.onDestroy();
} }
@Override @Override
@@ -127,5 +127,10 @@ public class ActivityUtils {
* @param ids the selected items' ids, if available * @param ids the selected items' ids, if available
*/ */
boolean onClick(int itemId, int[] positions, long[] ids); 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 context the context
* @param view the list item view * @param view the list item view
* @param isRecording true if recording * @param isRecording true if recording
* @param isPaused true if paused
* @param iconId the icon id * @param iconId the icon id
* @param iconContentDescriptionId the icon content description id * @param iconContentDescriptionId the icon content description id
* @param name the name value * @param name the name value
@@ -56,11 +55,11 @@ public class ListItemUtils {
* @param description the description value * @param description the description value
* @param hasPhoto true if this list item has photo * @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 // Set icon
if (isRecording) { if (isRecording) {
iconId = isPaused ? R.drawable.ic_track_paused : R.drawable.ic_track_recording; iconId = R.drawable.ic_track_recording;
iconContentDescriptionId = isPaused ? R.string.image_pause : R.string.image_record; iconContentDescriptionId = R.string.image_record;
} }
ImageView iconImageView = view.findViewById(R.id.list_item_icon); 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); TextView timeDistanceTextView = view.findViewById(R.id.list_item_time_distance);
String timeDistanceText; String timeDistanceText;
if (isRecording) { if (isRecording) {
timeDistanceText = context.getString(isPaused ? R.string.generic_paused : R.string.generic_recording); timeDistanceText = context.getString(R.string.generic_recording);
} else { } else {
// Match list_item_time_distance in list_item.xml // Match list_item_time_distance in list_item.xml
timeDistanceText = getTimeDistance(totalTime, totalDistance); 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"> <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"> <aapt:attr name="android:fillColor">
<gradient <gradient
android:endX="81.73018" android:endX="70.0"
android:endY="11.204678" android:endY="30.0"
android:startX="27.696081" android:startX="7.0"
android:startY="83.44198" android:startY="83.0"
android:type="linear"> android:type="linear">
<item <item
android:color="#FFFBB22F" android:color="#FFFBB22F"
android:offset="0" /> android:offset="0" />
<item <item
android:color="#FFF58820" android:color="#FFFF6D00"
android:offset="1" /> android:offset="1" />
</gradient> </gradient>
</aapt:attr> </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"?> <?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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:orientation="vertical">
<include layout="@layout/toolbar" /> <LinearLayout
<ScrollView
android:layout_width="match_parent" 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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
android:orientation="vertical"
android:padding="20dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="vertical"
android:layout_margin="8dp"> android:padding="20dp">
<ImageView <LinearLayout
android:id="@+id/imageView" android:layout_width="match_parent"
android:layout_width="30dp" android:layout_height="wrap_content"
android:layout_height="match_parent" android:orientation="horizontal"
android:contentDescription="@string/app_name" android:layout_margin="8dp">
android:scaleType="fitCenter"
android:src="@drawable/ic_logo_color_24dp" /> <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 <TextView
android:id="@+id/about_text_description" android:id="@+id/about_text_version_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceSubtitle1" android:textAppearance="?attr/textAppearanceSubtitle1"
android:gravity="center" 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> </LinearLayout>
</ScrollView>
<View style="@style/HorizontalLine" /> </LinearLayout>
<TextView <include android:id="@+id/bottom_app_bar_layout" layout="@layout/bottomappbar" />
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" />
<TextView </androidx.coordinatorlayout.widget.CoordinatorLayout>
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>
@@ -1,53 +1,61 @@
<?xml version="1.0" encoding="utf-8"?> <?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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<include layout="@layout/toolbar" /> <LinearLayout
<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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:hint="@string/settings_recording_customize_layout_select_columns"> xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:paddingBottom="60dp">
<de.dennisguse.opentracks.ui.util.AutoCompleteTextViewForDropdown <com.google.android.material.textfield.TextInputLayout
android:id="@+id/rows_options" android:id="@+id/rows_options_layout"
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox.ExposedDropdownMenu"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" 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 </com.google.android.material.textfield.TextInputLayout>
android:id="@+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.core.widget.NestedScrollView
android:id="@+id/scroll_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/recycler_view_visible"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/recycler_view_not_visible" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_not_visible" android:id="@+id/recycler_view_visible"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="24dp" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@id/recycler_view_visible" app:layout_constraintBottom_toTopOf="@id/recycler_view_not_visible" />
app:layout_constraintBottom_toBottomOf="parent" />
</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"?> <?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 <LinearLayout
android:id="@+id/custom_layout_list_add_linear_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:gravity="center_vertical" xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical" android:orientation="vertical"
android:layout_marginBottom="50dp" android:paddingBottom="60dp">
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>
<LinearLayout <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_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="wrap_content"
android:layout_margin="16dp" android:gravity="center_vertical"
android:gravity="end" android:orientation="vertical"
android:orientation="horizontal"> android:layout_marginBottom="50dp"
android:visibility="gone"
tools:visibility="visible">
<com.google.android.material.button.MaterialButton <com.google.android.material.textfield.TextInputLayout
android:id="@+id/custom_layout_list_cancel_button" android:id="@+id/custom_layout_list_input_layout"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="@style/Widget.MaterialComponents.Button.TextButton" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:text="@android:string/cancel" /> app:errorEnabled="true"
android:layout_margin="16dp">
<com.google.android.material.button.MaterialButton <com.google.android.material.textfield.TextInputEditText
android:id="@+id/custom_layout_list_ok_button" android:id="@+id/custom_layout_list_edit_name"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:enabled="false" android:inputType="textCapWords"
android:text="@android:string/ok" /> 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> </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> </LinearLayout>
<androidx.recyclerview.widget.RecyclerView <include android:id="@+id/bottom_app_bar_layout" layout="@layout/bottomappbar" />
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
+25 -17
View File
@@ -1,23 +1,31 @@
<?xml version="1.0" encoding="utf-8"?> <?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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:orientation="vertical">
<include layout="@layout/toolbar" /> <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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="16dp" android:orientation="vertical"
android:gravity="center_horizontal|center_vertical" android:paddingBottom="50dp">
android:text="@string/aggregated_stats_empty_message" />
</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"?> <?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_width="match_parent"
android:layout_height="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">
<include layout="@layout/toolbar" /> <LinearLayout
<androidx.core.widget.NestedScrollView
android:layout_weight="1"
android:layout_width="match_parent" 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_weight="1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="0dp">
<androidx.constraintlayout.widget.Guideline <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/guideline_vertical_half" android:layout_weight="1"
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"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent">
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 --> <androidx.constraintlayout.widget.Guideline
<!-- Tracks exported (new tracks) --> android:id="@+id/guideline_vertical_half"
<TextView android:layout_width="0dp"
android:id="@+id/export_progress_summary_new_msg" android:layout_height="0dp"
android:layout_width="0dp" android:orientation="vertical"
android:layout_height="wrap_content" app:layout_constraintGuide_percent="0.7" />
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 <TextView
android:id="@+id/export_progress_summary_new" android:id="@+id/export_progress_done"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1" style="?attr/textAppearanceSubtitle1"
app:layout_constraintBottom_toBottomOf="@id/export_progress_summary_new_msg" android:layout_marginStart="24dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginTop="48dp"
app:layout_constraintStart_toEndOf="@id/guideline_vertical_half" app:layout_constraintEnd_toStartOf="@id/export_progress_slash"
app:layout_constraintTop_toTopOf="@id/export_progress_summary_new_msg" app:layout_constraintHorizontal_chainStyle="packed"
tools:text="10" /> app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="1" />
<androidx.constraintlayout.widget.Barrier <TextView
android:id="@+id/export_progress_summary_new_barrier" android:id="@+id/export_progress_slash"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:barrierDirection="bottom" style="?attr/textAppearanceSubtitle1"
app:constraint_referenced_ids="export_progress_summary_new_msg,export_progress_summary_new" /> 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 <TextView
android:id="@+id/export_progress_summary_new_group" android:id="@+id/export_progress_total"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="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" android:visibility="gone"
tools:visibility="visible" tools:visibility="visible" />
app:constraint_referenced_ids="export_progress_summary_new_msg,export_progress_summary_new" />
<!-- Tracks overwritten --> <Button
<TextView android:id="@+id/export_progress_right_button"
android:id="@+id/export_progress_summary_overwrite_msg" style="@style/BottomButton"
android:layout_width="0dp" android:layout_gravity="end"
android:layout_height="wrap_content" android:text="@string/generic_overwrite"
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" android:visibility="gone"
tools:visibility="visible" tools:visibility="visible"/>
app:constraint_referenced_ids="export_progress_summary_overwrite_msg,export_progress_summary_overwrite" />
<!-- Tracks skipped --> </LinearLayout>
<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"?> <?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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:orientation="vertical">
<include layout="@layout/toolbar" /> <LinearLayout
<ScrollView
android:layout_width="match_parent" 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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
android:orientation="vertical"
android:padding="20dp">
<TextView <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6" android:orientation="vertical"
android:text="@string/help_feature_title" /> android:padding="20dp">
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceBody1" style="?attr/textAppearanceHeadline6"
android:text="@string/help_feature_content" /> android:text="@string/help_feature_title" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6" style="?attr/textAppearanceBody1"
android:layout_marginTop="20dp" android:text="@string/help_feature_content" />
android:text="@string/help_track_map_title" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceBody1" style="?attr/textAppearanceHeadline6"
android:linksClickable="true" android:layout_marginTop="20dp"
android:text="@string/help_track_map_content" /> android:text="@string/help_track_map_title" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6" style="?attr/textAppearanceBody1"
android:layout_marginTop="20dp" android:linksClickable="true"
android:text="@string/help_recording_title" /> android:text="@string/help_track_map_content" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceBody1" style="?attr/textAppearanceHeadline6"
android:text="@string/help_recording_content" /> android:layout_marginTop="20dp"
android:text="@string/help_recording_title" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6" style="?attr/textAppearanceBody1"
android:layout_marginTop="20dp" android:text="@string/help_recording_content" />
android:text="@string/help_storage_pictures_title" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceBody1" style="?attr/textAppearanceHeadline6"
android:text="@string/help_storage_pictures_content" /> android:layout_marginTop="20dp"
android:text="@string/help_storage_pictures_title" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6" style="?attr/textAppearanceBody1"
android:layout_marginTop="20dp" android:text="@string/help_storage_pictures_content" />
android:text="@string/help_track_export_title" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceBody1" style="?attr/textAppearanceHeadline6"
android:text="@string/help_track_export_content" /> android:layout_marginTop="20dp"
android:text="@string/help_track_export_title" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6" style="?attr/textAppearanceBody1"
android:text="@string/help_data_google_play_services_title" /> android:text="@string/help_track_export_content" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceBody1" style="?attr/textAppearanceHeadline6"
android:text="@android:string/no" /> android:text="@string/help_data_google_play_services_title" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6" style="?attr/textAppearanceBody1"
android:layout_marginTop="20dp" android:text="@android:string/no" />
android:text="@string/help_data_storage_title" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceBody1" style="?attr/textAppearanceHeadline6"
android:text="@string/help_data_storage_content" /> android:layout_marginTop="20dp"
android:text="@string/help_data_storage_title" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6" style="?attr/textAppearanceBody1"
android:layout_marginTop="20dp" android:text="@string/help_data_storage_content" />
android:text="@string/help_gps_troubleshooting_title" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceBody1" style="?attr/textAppearanceHeadline6"
android:linksClickable="true" android:layout_marginTop="20dp"
android:text="@string/help_gps_troubleshooting_content" /> android:text="@string/help_gps_troubleshooting_title" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceHeadline6" style="?attr/textAppearanceBody1"
android:layout_marginTop="20dp" android:linksClickable="true"
android:text="@string/help_support_title" /> android:text="@string/help_gps_troubleshooting_content" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceBody1" style="?attr/textAppearanceHeadline6"
android:linksClickable="true" android:layout_marginTop="20dp"
android:text="@string/help_support_content" /> android:text="@string/help_support_title" />
</LinearLayout>
</ScrollView>
</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"?> <?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_width="match_parent"
android:layout_height="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">
<include layout="@layout/toolbar" /> <LinearLayout
<androidx.core.widget.NestedScrollView
android:layout_weight="1"
android:layout_width="match_parent" 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_weight="1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="0dp">
<androidx.constraintlayout.widget.Guideline <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/guideline_vertical_half" android:layout_weight="1"
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"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent">
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 --> <androidx.constraintlayout.widget.Guideline
<!-- Files imported correctly --> android:id="@+id/guideline_vertical_half"
<TextView android:layout_width="0dp"
android:id="@+id/import_progress_summary_ok_msg" android:layout_height="0dp"
android:layout_width="0dp" android:orientation="vertical"
android:layout_height="wrap_content" app:layout_constraintGuide_percent="0.7" />
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 <TextView
android:id="@+id/import_progress_summary_ok" android:id="@+id/import_progress_done"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textAppearanceSubtitle1" style="?attr/textAppearanceSubtitle1"
app:layout_constraintBottom_toBottomOf="@id/import_progress_summary_ok_msg" android:layout_marginStart="24dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginTop="48dp"
app:layout_constraintStart_toEndOf="@id/guideline_vertical_half" app:layout_constraintEnd_toStartOf="@id/import_progress_slash"
app:layout_constraintTop_toTopOf="@id/import_progress_summary_ok_msg" app:layout_constraintHorizontal_chainStyle="packed"
tools:text="10" /> app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="1" />
<androidx.constraintlayout.widget.Barrier <TextView
android:id="@+id/import_progress_summary_ok_barrier" android:id="@+id/import_progress_slash"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:barrierDirection="bottom" style="?attr/textAppearanceSubtitle1"
app:constraint_referenced_ids="import_progress_summary_ok_msg,import_progress_summary_ok" /> 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 <TextView
android:id="@+id/import_progress_summary_ok_group" android:id="@+id/import_progress_total"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="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" android:visibility="gone"
tools:visibility="visible" tools:visibility="visible" />
app:constraint_referenced_ids="import_progress_summary_ok_msg,import_progress_summary_ok" />
<!-- Already exists files --> <Button
<TextView android:id="@+id/import_progress_right_button"
android:id="@+id/import_progress_summary_exists_msg" style="@style/BottomButton"
android:layout_width="0dp" android:layout_gravity="end"
android:layout_height="wrap_content" android:text="@android:string/ok"
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" android:visibility="gone"
tools:visibility="visible" tools:visibility="visible"/>
app:constraint_referenced_ids="import_progress_summary_exists_msg,import_progress_summary_exists" /> </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>
</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 See the License for the specific language governing permissions and
limitations under the License. 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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:orientation="vertical">
<include layout="@layout/toolbar" /> <LinearLayout
<androidx.viewpager.widget.ViewPager
android:id="@+id/maker_detail_activity_view_pager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent"
</LinearLayout> 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 See the License for the specific language governing permissions and
limitations under the License. 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_width="match_parent"
android:layout_height="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="vertical"
android:paddingBottom="50dp">
<ScrollView style="@style/ScrollView.WithBottomButtons"> <ScrollView style="@style/ScrollView.WithBottomButtons">
<LinearLayout <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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="?attr/textInputOutlinedStyle" android:orientation="vertical"
android:hint="@string/generic_name" android:padding="8dp">
android:imeOptions="actionNext"
android:importantForAutofill="no"
android:layout_marginBottom="16dp">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputLayout
android:id="@+id/marker_edit_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_marker_orange_pushpin_with_shadow" style="?attr/textInputOutlinedStyle"
android:inputType="textCapWords" android:hint="@string/generic_name"
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"
android:imeOptions="actionNext" 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 </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 <com.google.android.material.textfield.TextInputLayout
android:id="@+id/marker_edit_description"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="textCapSentences" style="?attr/textInputOutlinedExposedDropdownMenuStyle"
android:selectAllOnFocus="true" /> 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 </com.google.android.material.textfield.TextInputLayout>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp">
<ImageView <com.google.android.material.textfield.TextInputLayout
android:id="@+id/marker_edit_photo" 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_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentStart="true" android:layout_marginTop="16dp">
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 <ImageView
android:id="@+id/marker_edit_photo_delete" android:id="@+id/marker_edit_photo"
android:layout_width="32dp" android:layout_width="wrap_content"
android:layout_height="32dp" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_alignParentStart="true"
android:layout_alignParentEnd="true" android:layout_alignParentTop="true"
android:layout_margin="16dp" android:layout_alignParentEnd="true"
android:layout_marginStart="8dp" android:layout_alignParentBottom="true"
android:layout_marginTop="8dp" android:adjustViewBounds="true"
android:layout_marginEnd="8dp" android:contentDescription="@string/image_photo_marker"
android:layout_marginBottom="8dp" android:scaleType="fitStart" />
android:background="@drawable/shape_circle_darkgray"
android:padding="4dp" <ImageView
android:src="@drawable/ic_delete_forever_24dp" /> android:id="@+id/marker_edit_photo_delete"
</RelativeLayout> 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> </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>
</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 See the License for the specific language governing permissions and
limitations under the License. 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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:orientation="vertical">
<include layout="@layout/toolbar" /> <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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
style="?attr/textAppearanceHeadline4" android:orientation="vertical"
android:gravity="center_horizontal|center_vertical" android:paddingBottom="50dp">
android:text="@string/marker_list_empty_message" />
</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"?> <?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_width="match_parent"
android:layout_height="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="vertical"
android:paddingBottom="50dp">
<FrameLayout <FrameLayout
android:id="@+id/settings_fragment" android:id="@+id/settings_fragment"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" /> 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 See the License for the specific language governing permissions and
limitations under the License. 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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical">
<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 <View style="@style/BottomButtonDivider" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp">
<com.google.android.material.textfield.TextInputLayout <LinearLayout style="@style/BottomButtonBar">
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 <Button
android:id="@+id/track_edit_name" android:id="@+id/track_edit_cancel"
android:layout_width="match_parent" style="@style/BottomButton"
android:layout_height="wrap_content" android:layout_gravity="start"
android:inputType="textCapWords" android:text="@android:string/cancel" />
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_save"
style="@style/BottomButton"
android:layout_gravity="end"
android:text="@string/generic_save" />
</LinearLayout> </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>
</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 See the License for the specific language governing permissions and
limitations under the License. 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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> xmlns:app="http://schemas.android.com/apk/res-auto">
<include layout="@layout/toolbar" /> <LinearLayout
<ListView
android:id="@+id/track_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="match_parent"
android:layout_weight="1.0" /> android:orientation="vertical"
android:paddingBottom="50dp"
android:clipToPadding="false">
<RelativeLayout <ListView
android:id="@+id/track_list_empty_view" android:id="@+id/track_list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0">
<LinearLayout
android:id="@+id/track_list_arrow_long"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="0dp"
android:layout_alignParentBottom="true" android:layout_weight="0.8" />
android:paddingTop="16dp"
android:paddingBottom="12dp">
<View <RelativeLayout
android:layout_width="0dp" android:id="@+id/track_list_empty_view"
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
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="0dp"
android:layout_above="@id/track_list_arrow_long"> android:layout_weight="1.2">
<View <LinearLayout
android:layout_width="0dp" android:id="@+id/track_list_arrow_long"
android:layout_height="match_parent" android:layout_width="match_parent"
android:layout_weight="5" />
<TextView
style="?attr/textAppearanceHeadline6"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="22" android:layout_alignParentBottom="true"
android:gravity="start" android:paddingTop="16dp"
android:text="@string/track_list_empty_message" /> android:paddingBottom="12dp">
<View <View
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" /> android:layout_weight="0.7" />
</LinearLayout>
</RelativeLayout>
<androidx.fragment.app.FragmentContainerView <ImageView
android:id="@+id/controller_fragment" android:layout_width="0dp"
android:name="de.dennisguse.opentracks.ControllerFragment" 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_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
</LinearLayout> 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 See the License for the specific language governing permissions and
limitations under the License. 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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:orientation="vertical">
<include layout="@layout/toolbar" /> <LinearLayout
<com.google.android.material.tabs.TabLayout
android:id="@+id/track_detail_activity_tablayout"
android:layout_width="match_parent" 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 <com.google.android.material.tabs.TabLayout
android:id="@+id/track_detail_activity_view_pager" android:id="@+id/track_detail_activity_tablayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="wrap_content" />
android:layout_weight="1" />
</LinearLayout> <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"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> xmlns:app="http://schemas.android.com/apk/res-auto">
<include layout="@layout/toolbar" /> <LinearLayout
<com.google.android.material.tabs.TabLayout
android:id="@+id/track_detail_activity_tablayout"
android:layout_width="match_parent" 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 <com.google.android.material.tabs.TabLayout
android:id="@+id/track_recording_coordinator_layout" android:id="@+id/track_detail_activity_tablayout"
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_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 <androidx.viewpager2.widget.ViewPager2
android:id="@+id/controller_fragment" android:id="@+id/track_detail_activity_view_pager"
android:name="de.dennisguse.opentracks.ControllerFragment" 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_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="android:statusBarColor">?attr/colorPrimaryVariant</item>
<item name="windowActionModeOverlay">true</item>
<item name="android:colorBackground">@android:color/black</item> <item name="android:colorBackground">@android:color/black</item>
<item name="colorOnBackground">@android:color/white</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="colorOnSurface">@color/opentracks_surface_night_on_background_color</item>
<item name="android:activatedBackgroundIndicator">@drawable/activated_background</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> </style>
</resources> </resources>
+2 -2
View File
@@ -18,8 +18,8 @@ limitations under the License.
<color name="opentracks_primary_color">#344955</color> <color name="opentracks_primary_color">#344955</color>
<color name="opentracks_primary_variant_color">#232f34</color> <color name="opentracks_primary_variant_color">#232f34</color>
<color name="opentracks_on_primary_color">@android:color/white</color> <color name="opentracks_on_primary_color">@android:color/white</color>
<color name="opentracks_secondary_color">#ff8800</color> <color name="opentracks_secondary_color">#FF6D00</color>
<color name="opentracks_secondary_transparent">#55ff8800</color> <color name="opentracks_secondary_transparent">#55FF6D00</color>
<color name="opentracks_on_secondary_color">@android:color/white</color> <color name="opentracks_on_secondary_color">@android:color/white</color>
<color name="opentracks_surface_day_background_color">#f5f5f5</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"> <resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- toolbar --> <!-- bottom buttons bar -->
<style name="Widget.OpenTracks.Toolbar.Surface" parent="Widget.MaterialComponents.Toolbar.Surface">
<item name="android:background">#ff0000</item>
</style>
<!-- bottom bar -->
<style name="BottomButton" parent="Widget.MaterialComponents.Button.TextButton"> <style name="BottomButton" parent="Widget.MaterialComponents.Button.TextButton">
<item name="android:layout_height">wrap_content</item> <item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">1</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="android:statusBarColor">?attr/colorPrimaryVariant</item>
<item name="windowActionModeOverlay">true</item>
<item name="android:colorBackground">@android:color/white</item> <item name="android:colorBackground">@android:color/white</item>
<item name="colorOnBackground">@android:color/black</item> <item name="colorOnBackground">@android:color/black</item>
@@ -46,6 +44,15 @@ limitations under the License.
<!-- Linear progress indicator --> <!-- Linear progress indicator -->
<item name="linearProgressIndicatorStyle">@style/OpenTracksLinearProgressIndicator</item> <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>
<style name="OpenTracksLinearProgressIndicator" parent="Widget.MaterialComponents.LinearProgressIndicator"> <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:navigationBarColor">@color/splashscreen_background</item>
<item name="android:windowBackground">@drawable/splashscreen</item> <item name="android:windowBackground">@drawable/splashscreen</item>
</style> </style>
<style name="Widget.OpenTracks.FloatingActionButton" parent="Widget.MaterialComponents.FloatingActionButton">
<item name="fabCustomSize">64dp</item>
</style>
</resources> </resources>
+5
View File
@@ -52,4 +52,9 @@
<item name="android:textColor">?attr/colorOnBackground</item> <item name="android:textColor">?attr/colorOnBackground</item>
<item name="android:singleLine">true</item> <item name="android:singleLine">true</item>
</style> </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> </resources>