Cleanup.
@@ -17,7 +17,7 @@
|
|||||||
<rdf:RDF>
|
<rdf:RDF>
|
||||||
<cc:Work rdf:about="">
|
<cc:Work rdf:about="">
|
||||||
<dc:format>image/svg+xml</dc:format>
|
<dc:format>image/svg+xml</dc:format>
|
||||||
<dc:title></dc:title>
|
<dc:title />
|
||||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
</cc:Work>
|
</cc:Work>
|
||||||
</rdf:RDF>
|
</rdf:RDF>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -43,7 +43,7 @@
|
|||||||
<rdf:RDF>
|
<rdf:RDF>
|
||||||
<cc:Work rdf:about="">
|
<cc:Work rdf:about="">
|
||||||
<dc:format>image/svg+xml</dc:format>
|
<dc:format>image/svg+xml</dc:format>
|
||||||
<dc:title></dc:title>
|
<dc:title />
|
||||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
</cc:Work>
|
</cc:Work>
|
||||||
</rdf:RDF>
|
</rdf:RDF>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -41,7 +41,7 @@
|
|||||||
<rdf:RDF>
|
<rdf:RDF>
|
||||||
<cc:Work rdf:about="">
|
<cc:Work rdf:about="">
|
||||||
<dc:format>image/svg+xml</dc:format>
|
<dc:format>image/svg+xml</dc:format>
|
||||||
<dc:title></dc:title>
|
<dc:title />
|
||||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
</cc:Work>
|
</cc:Work>
|
||||||
</rdf:RDF>
|
</rdf:RDF>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -33,7 +33,7 @@
|
|||||||
<rdf:RDF>
|
<rdf:RDF>
|
||||||
<cc:Work rdf:about="">
|
<cc:Work rdf:about="">
|
||||||
<dc:format>image/svg+xml</dc:format>
|
<dc:format>image/svg+xml</dc:format>
|
||||||
<dc:title></dc:title>
|
<dc:title />
|
||||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
</cc:Work>
|
</cc:Work>
|
||||||
</rdf:RDF>
|
</rdf:RDF>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -39,7 +39,7 @@
|
|||||||
<rdf:RDF>
|
<rdf:RDF>
|
||||||
<cc:Work rdf:about="">
|
<cc:Work rdf:about="">
|
||||||
<dc:format>image/svg+xml</dc:format>
|
<dc:format>image/svg+xml</dc:format>
|
||||||
<dc:title></dc:title>
|
<dc:title />
|
||||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
</cc:Work>
|
</cc:Work>
|
||||||
</rdf:RDF>
|
</rdf:RDF>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -18,7 +18,7 @@
|
|||||||
<rdf:RDF>
|
<rdf:RDF>
|
||||||
<cc:Work rdf:about="">
|
<cc:Work rdf:about="">
|
||||||
<dc:format>image/svg+xml</dc:format>
|
<dc:format>image/svg+xml</dc:format>
|
||||||
<dc:title></dc:title>
|
<dc:title />
|
||||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
</cc:Work>
|
</cc:Work>
|
||||||
</rdf:RDF>
|
</rdf:RDF>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -21,7 +21,7 @@
|
|||||||
<rdf:RDF>
|
<rdf:RDF>
|
||||||
<cc:Work rdf:about="">
|
<cc:Work rdf:about="">
|
||||||
<dc:format>image/svg+xml</dc:format>
|
<dc:format>image/svg+xml</dc:format>
|
||||||
<dc:title></dc:title>
|
<dc:title />
|
||||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
</cc:Work>
|
</cc:Work>
|
||||||
</rdf:RDF>
|
</rdf:RDF>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -74,8 +74,7 @@ public class MarkerListActivity extends AbstractActivity implements DeleteMarker
|
|||||||
* Note that sharedPreferenceChangeListener cannot be an anonymous inner
|
* Note that sharedPreferenceChangeListener cannot be an anonymous inner
|
||||||
* class. Anonymous inner class will get garbage collected.
|
* class. Anonymous inner class will get garbage collected.
|
||||||
*/
|
*/
|
||||||
private final OnSharedPreferenceChangeListener
|
private final OnSharedPreferenceChangeListener sharedPreferenceChangeListener = new OnSharedPreferenceChangeListener() {
|
||||||
sharedPreferenceChangeListener = new OnSharedPreferenceChangeListener() {
|
|
||||||
@Override
|
@Override
|
||||||
public void onSharedPreferenceChanged(SharedPreferences preferences, String key) {
|
public void onSharedPreferenceChanged(SharedPreferences preferences, String key) {
|
||||||
// Note that the key can be null
|
// Note that the key can be null
|
||||||
@@ -166,6 +165,7 @@ public class MarkerListActivity extends AbstractActivity implements DeleteMarker
|
|||||||
String category = cursor.getString(categoryIndex);
|
String category = cursor.getString(categoryIndex);
|
||||||
String description = cursor.getString(descriptionIndex);
|
String description = cursor.getString(descriptionIndex);
|
||||||
String photoUrl = cursor.getString(photoUrlIndex);
|
String photoUrl = cursor.getString(photoUrlIndex);
|
||||||
|
//TODO also show latitude and longitude in list
|
||||||
double latitude = cursor.getDouble(latitudeIndex);
|
double latitude = cursor.getDouble(latitudeIndex);
|
||||||
double longitude = cursor.getDouble(longitudeIndex);
|
double longitude = cursor.getDouble(longitudeIndex);
|
||||||
|
|
||||||
@@ -244,7 +244,7 @@ public class MarkerListActivity extends AbstractActivity implements DeleteMarker
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||||
if (track != null && item.getItemId() == R.id.marker_list_insert_marker) {
|
if (track != null && item.getItemId() == R.id.marker_list_insert_marker) {
|
||||||
Intent intent = IntentUtils.newIntent(this, MarkerEditActivity.class)
|
Intent intent = IntentUtils.newIntent(this, MarkerEditActivity.class)
|
||||||
.putExtra(MarkerEditActivity.EXTRA_TRACK_ID, track.getId());
|
.putExtra(MarkerEditActivity.EXTRA_TRACK_ID, track.getId());
|
||||||
|
|||||||
@@ -117,10 +117,8 @@ public class TrackDetailActivity extends AbstractListActivity implements ChooseA
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/*
|
|
||||||
* Note that sharedPreferenceChangeListener cannot be an anonymous inner
|
// Note that sharedPreferenceChangeListener cannot be an anonymous inner class. Anonymous inner class will get garbage collected.
|
||||||
* class. Anonymous inner class will get garbage collected.
|
|
||||||
*/
|
|
||||||
private final OnSharedPreferenceChangeListener sharedPreferenceChangeListener = new OnSharedPreferenceChangeListener() {
|
private final OnSharedPreferenceChangeListener sharedPreferenceChangeListener = new OnSharedPreferenceChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSharedPreferenceChanged(SharedPreferences preferences, String key) {
|
public void onSharedPreferenceChanged(SharedPreferences preferences, String key) {
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ import android.graphics.Paint.Align;
|
|||||||
import android.graphics.Paint.Style;
|
import android.graphics.Paint.Style;
|
||||||
import android.graphics.Path;
|
import android.graphics.Path;
|
||||||
|
|
||||||
import androidx.annotation.VisibleForTesting;
|
|
||||||
|
|
||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
|
|
||||||
import de.dennisguse.opentracks.stats.ExtremityMonitor;
|
import de.dennisguse.opentracks.stats.ExtremityMonitor;
|
||||||
@@ -203,7 +201,6 @@ class ChartValueSeries {
|
|||||||
/**
|
/**
|
||||||
* Gets the interval value.
|
* Gets the interval value.
|
||||||
*/
|
*/
|
||||||
@VisibleForTesting
|
|
||||||
int getInterval() {
|
int getInterval() {
|
||||||
return interval;
|
return interval;
|
||||||
}
|
}
|
||||||
@@ -218,7 +215,6 @@ class ChartValueSeries {
|
|||||||
/**
|
/**
|
||||||
* Gets the max marker value.
|
* Gets the max marker value.
|
||||||
*/
|
*/
|
||||||
@VisibleForTesting
|
|
||||||
int getMaxMarkerValue() {
|
int getMaxMarkerValue() {
|
||||||
return maxMarkerValue;
|
return maxMarkerValue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ import androidx.core.view.GestureDetectorCompat;
|
|||||||
|
|
||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import de.dennisguse.opentracks.MarkerDetailActivity;
|
import de.dennisguse.opentracks.MarkerDetailActivity;
|
||||||
import de.dennisguse.opentracks.R;
|
import de.dennisguse.opentracks.R;
|
||||||
@@ -86,8 +87,8 @@ public class ChartView extends View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final ChartValueSeries[] series = new ChartValueSeries[NUM_SERIES];
|
private final ChartValueSeries[] series = new ChartValueSeries[NUM_SERIES];
|
||||||
private final ArrayList<double[]> chartData = new ArrayList<>();
|
private final List<double[]> chartData = new ArrayList<>();
|
||||||
private final ArrayList<Waypoint> waypoints = new ArrayList<>();
|
private final List<Waypoint> waypoints = new ArrayList<>();
|
||||||
private final ExtremityMonitor xExtremityMonitor = new ExtremityMonitor();
|
private final ExtremityMonitor xExtremityMonitor = new ExtremityMonitor();
|
||||||
private final Paint axisPaint;
|
private final Paint axisPaint;
|
||||||
private final Paint xAxisMarkerPaint;
|
private final Paint xAxisMarkerPaint;
|
||||||
@@ -146,7 +147,7 @@ public class ChartView extends View {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onSingleTapConfirmed(MotionEvent event) {
|
public boolean onSingleTapConfirmed(MotionEvent event) {
|
||||||
// Check if the y event is within markerHeight of the marker center
|
// Check if the y event is within markerHeight of the marker center
|
||||||
if (Math.abs(event.getY() - topBorder - spacer - markerHeight / 2) < markerHeight) {
|
if (Math.abs(event.getY() - topBorder - spacer - markerHeight / 2f) < markerHeight) {
|
||||||
int minDistance = Integer.MAX_VALUE;
|
int minDistance = Integer.MAX_VALUE;
|
||||||
Waypoint nearestWaypoint = null;
|
Waypoint nearestWaypoint = null;
|
||||||
synchronized (waypoints) {
|
synchronized (waypoints) {
|
||||||
@@ -324,8 +325,7 @@ public class ChartView extends View {
|
|||||||
public void addDataPoints(ArrayList<double[]> dataPoints) {
|
public void addDataPoints(ArrayList<double[]> dataPoints) {
|
||||||
synchronized (chartData) {
|
synchronized (chartData) {
|
||||||
chartData.addAll(dataPoints);
|
chartData.addAll(dataPoints);
|
||||||
for (int i = 0; i < dataPoints.size(); i++) {
|
for (double[] dataPoint : dataPoints) {
|
||||||
double[] dataPoint = dataPoints.get(i);
|
|
||||||
xExtremityMonitor.update(dataPoint[0]);
|
xExtremityMonitor.update(dataPoint[0]);
|
||||||
for (int j = 0; j < series.length; j++) {
|
for (int j = 0; j < series.length; j++) {
|
||||||
if (!Double.isNaN(dataPoint[j + 1])) {
|
if (!Double.isNaN(dataPoint[j + 1])) {
|
||||||
@@ -537,9 +537,9 @@ public class ChartView extends View {
|
|||||||
*/
|
*/
|
||||||
private void drawGrid(Canvas canvas) {
|
private void drawGrid(Canvas canvas) {
|
||||||
// X axis grid
|
// X axis grid
|
||||||
ArrayList<Double> xAxisMarkerPositions = getXAxisMarkerPositions(getXAxisInterval());
|
List<Double> xAxisMarkerPositions = getXAxisMarkerPositions(getXAxisInterval());
|
||||||
for (int i = 0; i < xAxisMarkerPositions.size(); i++) {
|
for (double position : xAxisMarkerPositions) {
|
||||||
int x = getX(xAxisMarkerPositions.get(i));
|
int x = getX(position);
|
||||||
canvas.drawLine(x, topBorder, x, topBorder + effectiveHeight, gridPaint);
|
canvas.drawLine(x, topBorder, x, topBorder + effectiveHeight, gridPaint);
|
||||||
}
|
}
|
||||||
// Y axis grid
|
// Y axis grid
|
||||||
@@ -611,7 +611,7 @@ public class ChartView extends View {
|
|||||||
canvas.drawText(label, x + effectiveWidth + spacer, y + yOffset, axisPaint);
|
canvas.drawText(label, x + effectiveWidth + spacer, y + yOffset, axisPaint);
|
||||||
|
|
||||||
double interval = getXAxisInterval();
|
double interval = getXAxisInterval();
|
||||||
ArrayList<Double> markerPositions = getXAxisMarkerPositions(interval);
|
List<Double> markerPositions = getXAxisMarkerPositions(interval);
|
||||||
NumberFormat numberFormat = interval < 1 ? X_FRACTION_FORMAT : X_NUMBER_FORMAT;
|
NumberFormat numberFormat = interval < 1 ? X_FRACTION_FORMAT : X_NUMBER_FORMAT;
|
||||||
for (int i = 0; i < markerPositions.size(); i++) {
|
for (int i = 0; i < markerPositions.size(); i++) {
|
||||||
drawXAxisMarker(canvas, markerPositions.get(i), numberFormat, spacer + yOffset);
|
drawXAxisMarker(canvas, markerPositions.get(i), numberFormat, spacer + yOffset);
|
||||||
@@ -664,8 +664,8 @@ public class ChartView extends View {
|
|||||||
/**
|
/**
|
||||||
* Gets the x axis marker positions.
|
* Gets the x axis marker positions.
|
||||||
*/
|
*/
|
||||||
private ArrayList<Double> getXAxisMarkerPositions(double interval) {
|
private List<Double> getXAxisMarkerPositions(double interval) {
|
||||||
ArrayList<Double> markers = new ArrayList<>();
|
List<Double> markers = new ArrayList<>();
|
||||||
markers.add(0d);
|
markers.add(0d);
|
||||||
for (int i = 1; i * interval < maxX; i++) {
|
for (int i = 1; i * interval < maxX; i++) {
|
||||||
markers.add(i * interval);
|
markers.add(i * interval);
|
||||||
@@ -775,8 +775,7 @@ public class ChartView extends View {
|
|||||||
private void drawPaths() {
|
private void drawPaths() {
|
||||||
boolean[] hasMoved = new boolean[series.length];
|
boolean[] hasMoved = new boolean[series.length];
|
||||||
|
|
||||||
for (int i = 0; i < chartData.size(); i++) {
|
for (double[] dataPoint : chartData) {
|
||||||
double[] dataPoint = chartData.get(i);
|
|
||||||
for (int j = 0; j < series.length; j++) {
|
for (int j = 0; j < series.length; j++) {
|
||||||
double value = dataPoint[j + 1];
|
double value = dataPoint[j + 1];
|
||||||
if (Double.isNaN(value)) {
|
if (Double.isNaN(value)) {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ public final class SensorDataSet {
|
|||||||
public static final float DATA_UNAVAILABLE = Float.NaN;
|
public static final float DATA_UNAVAILABLE = Float.NaN;
|
||||||
|
|
||||||
//TODO It might be necessary to consider: if sensor was connected as well.
|
//TODO It might be necessary to consider: if sensor was connected as well.
|
||||||
public String sensorName;
|
private String sensorName;
|
||||||
public String sensorAddress;
|
private String sensorAddress;
|
||||||
private float heartRate;
|
private float heartRate;
|
||||||
private float cadence;
|
private float cadence;
|
||||||
private float power;
|
private float power;
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ public enum TrackFileFormat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public TrackExporter newTrackExporter(Context context, Track[] tracks, TrackExporterListener trackExporterListener) {
|
public TrackExporter newTrackExporter(Context context, Track[] tracks, TrackExporterListener trackExporterListener) {
|
||||||
return newKmzTrackExporter(context, this.newTrackWriter(context, tracks.length > 1), tracks, trackExporterListener, exportPhotos);
|
return newKmzTrackExporter(context, newTrackWriter(context, tracks.length > 1), tracks, trackExporterListener, exportPhotos);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getExtension() {
|
public String getExtension() {
|
||||||
@@ -188,7 +188,7 @@ public enum TrackFileFormat {
|
|||||||
|
|
||||||
public TrackExporter newTrackExporter(Context context, Track[] tracks, TrackExporterListener trackExporterListener) {
|
public TrackExporter newTrackExporter(Context context, Track[] tracks, TrackExporterListener trackExporterListener) {
|
||||||
ContentProviderUtils contentProviderUtils = new ContentProviderUtils(context);
|
ContentProviderUtils contentProviderUtils = new ContentProviderUtils(context);
|
||||||
TrackWriter trackWriter = this.newTrackWriter(context, tracks.length > 1);
|
TrackWriter trackWriter = newTrackWriter(context, tracks.length > 1);
|
||||||
return new FileTrackExporter(contentProviderUtils, trackWriter, tracks, trackExporterListener);
|
return new FileTrackExporter(contentProviderUtils, trackWriter, tracks, trackExporterListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -536,8 +536,7 @@ public class TrackRecordingService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Common code for starting a new track, resuming a track, or restarting after
|
* Common code for starting a new track, resuming a track, or restarting after phone reboot.
|
||||||
* phone reboot.
|
|
||||||
*
|
*
|
||||||
* @param trackStarted true if track is started, false if track is resumed
|
* @param trackStarted true if track is started, false if track is resumed
|
||||||
*/
|
*/
|
||||||
@@ -597,7 +596,7 @@ public class TrackRecordingService extends Service {
|
|||||||
contentProviderUtils.updateTrack(track);
|
contentProviderUtils.updateTrack(track);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
endRecording(true, trackId);
|
endRecording(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -625,7 +624,7 @@ public class TrackRecordingService extends Service {
|
|||||||
insertLocation(track, pause, null);
|
insertLocation(track, pause, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
endRecording(false, recordingTrackId);
|
endRecording(false);
|
||||||
|
|
||||||
notificationManager.updateContent(getString(R.string.generic_paused));
|
notificationManager.updateContent(getString(R.string.generic_paused));
|
||||||
}
|
}
|
||||||
@@ -634,9 +633,8 @@ public class TrackRecordingService extends Service {
|
|||||||
* Common code for ending a track or pausing a track.
|
* Common code for ending a track or pausing a track.
|
||||||
*
|
*
|
||||||
* @param trackStopped true if track is stopped, false if track is paused
|
* @param trackStopped true if track is stopped, false if track is paused
|
||||||
* @param trackId the track id
|
|
||||||
*/
|
*/
|
||||||
private void endRecording(boolean trackStopped, long trackId) {
|
private void endRecording(boolean trackStopped) {
|
||||||
// Shutdown periodic tasks
|
// Shutdown periodic tasks
|
||||||
voiceExecutor.shutdown();
|
voiceExecutor.shutdown();
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class BluetoothLeAdapter extends BaseAdapter {
|
|||||||
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
|
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
|
||||||
//TODO Check if there is a better way to achieve identical look and feel to ListPreference.
|
//TODO Check if there is a better way to achieve identical look and feel to ListPreference.
|
||||||
//Use material design single choice; for old style use: android.R.layout.select_dialog_singlechoice
|
//Use material design single choice; for old style use: android.R.layout.select_dialog_singlechoice
|
||||||
currentView = inflater.inflate(androidx.appcompat.R.layout.select_dialog_singlechoice_material, null);
|
currentView = inflater.inflate(androidx.appcompat.R.layout.select_dialog_singlechoice_material, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
Device device = devices.get(position);
|
Device device = devices.get(position);
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public class PreferencesUtils {
|
|||||||
* Compares if keyId and key belong to the same shared preference key.
|
* Compares if keyId and key belong to the same shared preference key.
|
||||||
*
|
*
|
||||||
* @param keyId The resource id of the key
|
* @param keyId The resource id of the key
|
||||||
* @param key
|
* @param key The key of the preference
|
||||||
* @return true if key == null or key belongs to keyId
|
* @return true if key == null or key belongs to keyId
|
||||||
*/
|
*/
|
||||||
public static boolean isKey(Context context, int keyId, String key) {
|
public static boolean isKey(Context context, int keyId, String key) {
|
||||||
@@ -316,7 +316,6 @@ public class PreferencesUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static int getRecordingDistanceInterval(Context context) {
|
public static int getRecordingDistanceInterval(Context context) {
|
||||||
final int RECORDING_DISTANCE_INTERVAL = Integer.parseInt(context.getResources().getString(R.string.recording_distance_interval_default));
|
|
||||||
return PreferencesUtils.getInt(context, R.string.recording_distance_interval_key, getRecordingDistanceIntervalDefault(context));
|
return PreferencesUtils.getInt(context, R.string.recording_distance_interval_key, getRecordingDistanceIntervalDefault(context));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 242 B |
|
Before Width: | Height: | Size: 229 B |
|
Before Width: | Height: | Size: 262 B |
@@ -17,55 +17,50 @@ limitations under the License.
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/marker_detail_waypoint_photo"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@android:color/black"
|
||||||
|
android:contentDescription="@string/image_photo_marker"
|
||||||
|
android:scaleType="fitCenter" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content">
|
||||||
|
<!-- A gradient on top of the text -->
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/marker_detail_waypoint_photo"
|
android:id="@+id/marker_detail_waypoint_text_gradient"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@android:color/black"
|
android:alpha=".6"
|
||||||
android:contentDescription="@string/image_photo_marker"
|
android:contentDescription="@string/image_photo_marker"
|
||||||
android:scaleType="fitCenter" />
|
android:src="@drawable/text_gradient" />
|
||||||
|
|
||||||
<FrameLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/marker_detail_waypoint_info"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
<!-- A gradient on top of the text -->
|
android:layout_marginBottom="80dp"
|
||||||
<ImageView
|
android:orientation="vertical"
|
||||||
android:id="@+id/marker_detail_waypoint_text_gradient"
|
android:padding="8dp">
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:alpha=".6"
|
|
||||||
android:contentDescription="@string/image_photo_marker"
|
|
||||||
android:src="@drawable/text_gradient" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<TextView
|
||||||
android:id="@+id/marker_detail_waypoint_info"
|
android:id="@+id/marker_detail_waypoint_name"
|
||||||
android:layout_width="match_parent"
|
style="@style/TextMedium"
|
||||||
android:layout_height="wrap_content"
|
android:paddingTop="8dp" />
|
||||||
android:layout_marginBottom="80dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="8dp">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/marker_detail_waypoint_name"
|
android:id="@+id/marker_detail_waypoint_category"
|
||||||
style="@style/TextMedium"
|
style="@style/TextSmall" />
|
||||||
android:paddingTop="8dp" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/marker_detail_waypoint_category"
|
android:id="@+id/marker_detail_waypoint_description"
|
||||||
style="@style/TextSmall" />
|
style="@style/TextSmall" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/marker_detail_waypoint_description"
|
android:id="@+id/marker_detail_waypoint_location"
|
||||||
style="@style/TextSmall" />
|
style="@style/TextSmall" />
|
||||||
|
</LinearLayout>
|
||||||
<TextView
|
|
||||||
android:id="@+id/marker_detail_waypoint_location"
|
|
||||||
style="@style/TextSmall" />
|
|
||||||
</LinearLayout>
|
|
||||||
</FrameLayout>
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
@@ -1,18 +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.
|
|
||||||
-->
|
|
||||||
<resources>
|
|
||||||
<dimen name="widget_margin">0dp</dimen>
|
|
||||||
</resources>
|
|
||||||
@@ -1,23 +1,23 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!-- This file contains old and now unused settings. -->
|
<!-- This file contains old and now unused settings. -->
|
||||||
<!-- It is recommended not to reuse the keys. -->
|
<!-- It is recommended not to reuse the keys. -->
|
||||||
|
|
||||||
<string name="chart_x_axis_key" translatable="false">chartXAxis</string>
|
<string name="chart_x_axis_key" translatable="false" tools:keep="@string/chart_x_axis_key">chartXAxis</string>
|
||||||
<string name="chart_x_axis_default" translatable="false">@string/chart_x_axis_distance</string>
|
<string name="chart_x_axis_default" translatable="false" tools:keep="@string/chart_x_axis_default">@string/chart_x_axis_distance</string>
|
||||||
<string-array name="chart_x_axis_values">
|
<string-array name="chart_x_axis_values" tools:keep="@array/chart_x_axis_values">
|
||||||
<item>@string/chart_x_axis_distance</item>
|
<item>@string/chart_x_axis_distance</item>
|
||||||
<item>@string/chart_x_axis_time</item>
|
<item>@string/chart_x_axis_time</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string name="chart_x_axis_time" translatable="false">TIME</string>
|
<string name="chart_x_axis_time" translatable="false" tools:keep="@string/chart_x_axis_time">TIME</string>
|
||||||
<string name="chart_x_axis_distance" translatable="false">DISTANCE</string>
|
<string name="chart_x_axis_distance" translatable="false" tools:keep="@string/chart_x_axis_distance">DISTANCE</string>
|
||||||
<string-array name="chart_x_axis_options">
|
<string-array name="chart_x_axis_options" tools:keep="@array/chart_x_axis_options">
|
||||||
<item>@string/settings_chart_by_distance</item>
|
<item>@string/settings_chart_by_distance</item>
|
||||||
<item>@string/settings_chart_by_time</item>
|
<item>@string/settings_chart_by_time</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string name="split_frequency_key" translatable="false">splitFrequency</string>
|
<string name="split_frequency_key" translatable="false" tools:keep="@string/split_frequency_key">splitFrequency</string>
|
||||||
<string name="split_frequency_default" translatable="false">@string/frequency_off</string>
|
<string name="split_frequency_default" translatable="false" tools:keep="@string/split_frequency_default">@string/frequency_off</string>
|
||||||
<string name="voice_frequency_key" translatable="false">voiceFrequency</string>
|
<string name="voice_frequency_key" translatable="false">voiceFrequency</string>
|
||||||
<string name="voice_frequency_default" translatable="false">@string/frequency_off</string>
|
<string name="voice_frequency_default" translatable="false">@string/frequency_off</string>
|
||||||
<string name="frequency_off" translatable="false">0</string>
|
<string name="frequency_off" translatable="false">0</string>
|
||||||
|
|||||||