mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-02-02 21:17:32 +01:00
Add Step length preference to About you
Add new distance icon Distance in meters or km based on distance Remove unnecessary definitions Optimize new drawables Map intensity to min steps
This commit is contained in:
parent
92407d3490
commit
e7b5053b13
70
app/src/main/assets/ic_distance.svg
Normal file
70
app/src/main/assets/ic_distance.svg
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
<?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="19.146656"
|
||||||
|
viewBox="0 0 19.380181 19.146656"
|
||||||
|
width="19.38018"
|
||||||
|
version="1.1"
|
||||||
|
id="svg6"
|
||||||
|
sodipodi:docname="ic_distance.svg"
|
||||||
|
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
||||||
|
<metadata
|
||||||
|
id="metadata12">
|
||||||
|
<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></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<defs
|
||||||
|
id="defs10" />
|
||||||
|
<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="1042"
|
||||||
|
id="namedview8"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:snap-others="false"
|
||||||
|
inkscape:object-nodes="false"
|
||||||
|
inkscape:zoom="26.103965"
|
||||||
|
inkscape:cx="19.880713"
|
||||||
|
inkscape:cy="4.8398397"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="38"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg6" />
|
||||||
|
<path
|
||||||
|
d="M -0.77182725,-2.0722505 H 23.228173 V 21.927749 H -0.77182725 Z"
|
||||||
|
fill="none"
|
||||||
|
id="path2" />
|
||||||
|
<path
|
||||||
|
d="m 6.0804285,11.546119 c -0.8360589,0 -1.5201071,-0.684048 -1.5201071,-1.520107 0,-0.8360578 0.6840483,-1.5201055 1.5201071,-1.5201055 0.836059,0 1.5201069,0.6840477 1.5201069,1.5201055 0,0.836059 -0.6840479,1.520107 -1.5201069,1.520107 z M 10.64075,10.178023 c 0,-2.7589943 -2.0141423,-4.712332 -4.5603215,-4.712332 -2.5461794,0 -4.5603214,1.9533377 -4.5603214,4.712332 0,1.778525 1.4821045,4.134691 4.5603214,6.94689 3.0782168,-2.812199 4.5603215,-5.168365 4.5603215,-6.94689 z M 6.0804285,3.9455838 c 3.1922253,0 6.0804285,2.4473729 6.0804285,6.2324392 0,2.523378 -2.029343,5.510388 -6.0804285,8.968632 C 2.029343,15.688411 0,12.701401 0,10.178023 0,6.3929567 2.8882037,3.9455838 6.0804285,3.9455838 Z"
|
||||||
|
id="path4"
|
||||||
|
style="stroke-width:1" />
|
||||||
|
<path
|
||||||
|
d="m 16.105923,4.2275996 c -0.421371,0 -0.76613,-0.344759 -0.76613,-0.76613 0,-0.4213716 0.344759,-0.7661296 0.76613,-0.7661296 0.421372,0 0.76613,0.344758 0.76613,0.7661296 0,0.421371 -0.344758,0.76613 -0.76613,0.76613 z m 2.29839,-0.689517 c 0,-1.3905256 -1.015122,-2.3750026 -2.29839,-2.3750026 -1.283268,0 -2.29839,0.984477 -2.29839,2.3750026 0,0.896372 0.746977,2.083873 2.29839,3.501214 1.551413,-1.417341 2.29839,-2.604842 2.29839,-3.501214 z m -2.29839,-3.14113259 c 1.608873,0 3.06452,1.23346899 3.06452,3.14113259 0,1.271776 -1.022784,2.777221 -3.06452,4.520167 -2.041736,-1.742946 -3.06452,-3.248391 -3.06452,-4.520167 0,-1.9076636 1.455647,-3.14113259 3.06452,-3.14113259 z"
|
||||||
|
id="path4-3"
|
||||||
|
style="stroke-width:0.999999" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
|
d="M 8.399119,18.046615 C 25.927241,13.211774 8.3489042,11.251336 15.01982,7.7851976"
|
||||||
|
id="path852"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
</svg>
|
After Width: | Height: | Size: 3.5 KiB |
@ -259,8 +259,8 @@ public class ActivitySummaryDetail extends AbstractGBActivity {
|
|||||||
String activityname = item.getName();
|
String activityname = item.getName();
|
||||||
Date starttime = item.getStartTime();
|
Date starttime = item.getStartTime();
|
||||||
Date endtime = item.getEndTime();
|
Date endtime = item.getEndTime();
|
||||||
String starttimeS = DateTimeUtils.formatDateTime(starttime);
|
String starttimeS = String.format("%s, %s", DateTimeUtils.formatDate(starttime), DateTimeUtils.formatTime(starttime.getHours(), starttime.getMinutes()));
|
||||||
String endtimeS = DateTimeUtils.formatDateTime(endtime);
|
String endtimeS = String.format("%s, %s", DateTimeUtils.formatDate(endtime), DateTimeUtils.formatTime(endtime.getHours(), endtime.getMinutes()));
|
||||||
String durationhms = DateTimeUtils.formatDurationHoursMinutes((endtime.getTime() - starttime.getTime()), TimeUnit.MILLISECONDS);
|
String durationhms = DateTimeUtils.formatDurationHoursMinutes((endtime.getTime() - starttime.getTime()), TimeUnit.MILLISECONDS);
|
||||||
|
|
||||||
ImageView activity_icon = findViewById(R.id.item_image);
|
ImageView activity_icon = findViewById(R.id.item_image);
|
||||||
|
@ -70,6 +70,7 @@ import static nodomain.freeyourgadget.gadgetbridge.model.ActivityUser.PREF_USER_
|
|||||||
import static nodomain.freeyourgadget.gadgetbridge.model.ActivityUser.PREF_USER_STEPS_GOAL;
|
import static nodomain.freeyourgadget.gadgetbridge.model.ActivityUser.PREF_USER_STEPS_GOAL;
|
||||||
import static nodomain.freeyourgadget.gadgetbridge.model.ActivityUser.PREF_USER_WEIGHT_KG;
|
import static nodomain.freeyourgadget.gadgetbridge.model.ActivityUser.PREF_USER_WEIGHT_KG;
|
||||||
import static nodomain.freeyourgadget.gadgetbridge.model.ActivityUser.PREF_USER_YEAR_OF_BIRTH;
|
import static nodomain.freeyourgadget.gadgetbridge.model.ActivityUser.PREF_USER_YEAR_OF_BIRTH;
|
||||||
|
import static nodomain.freeyourgadget.gadgetbridge.model.ActivityUser.PREF_USER_STEP_LENGTH_CM;
|
||||||
|
|
||||||
public class SettingsActivity extends AbstractSettingsActivity {
|
public class SettingsActivity extends AbstractSettingsActivity {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(SettingsActivity.class);
|
private static final Logger LOG = LoggerFactory.getLogger(SettingsActivity.class);
|
||||||
@ -459,6 +460,7 @@ public class SettingsActivity extends AbstractSettingsActivity {
|
|||||||
PREF_USER_WEIGHT_KG,
|
PREF_USER_WEIGHT_KG,
|
||||||
PREF_USER_SLEEP_DURATION,
|
PREF_USER_SLEEP_DURATION,
|
||||||
PREF_USER_STEPS_GOAL,
|
PREF_USER_STEPS_GOAL,
|
||||||
|
PREF_USER_STEP_LENGTH_CM,
|
||||||
"weather_city",
|
"weather_city",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -39,10 +39,16 @@ public class ActivityListingAdapter extends AbstractActivityListingAdapter<StepA
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getDistanceLabel(StepAnalysis.StepSession item) {
|
protected String getDistanceLabel(StepAnalysis.StepSession item) {
|
||||||
DecimalFormat df = new DecimalFormat("###m");
|
float distance = item.getDistance();
|
||||||
|
String unit = "###m";
|
||||||
|
if (distance > 2000) {
|
||||||
|
distance = distance / 1000;
|
||||||
|
unit = "###.#km";
|
||||||
|
}
|
||||||
|
DecimalFormat df = new DecimalFormat(unit);
|
||||||
//DecimalFormatSymbols symbols = df.getDecimalFormatSymbols();
|
//DecimalFormatSymbols symbols = df.getDecimalFormatSymbols();
|
||||||
//symbols.setGroupingSeparator(' ');
|
//symbols.setGroupingSeparator(' ');
|
||||||
return df.format(item.getDistance());
|
return df.format(distance);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -80,6 +86,15 @@ public class ActivityListingAdapter extends AbstractActivityListingAdapter<StepA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean hasDistance(StepAnalysis.StepSession item) {
|
||||||
|
if (item.getDistance() > 0) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getIcon(StepAnalysis.StepSession item) {
|
protected int getIcon(StepAnalysis.StepSession item) {
|
||||||
int activityKind = item.getActivityKind();
|
int activityKind = item.getActivityKind();
|
||||||
|
@ -105,7 +105,6 @@ public class ActivityListingChartFragment extends AbstractChartFragment {
|
|||||||
getChartsHost().enableSwipeRefresh(true); //try to enable pull to refresh, might be needed
|
getChartsHost().enableSwipeRefresh(true); //try to enable pull to refresh, might be needed
|
||||||
} else {
|
} else {
|
||||||
getChartsHost().enableSwipeRefresh(false); //disable pull to refresh as it collides with swipable view
|
getChartsHost().enableSwipeRefresh(false); //disable pull to refresh as it collides with swipable view
|
||||||
// this still provides one pull to refresh on the start, in case it is needed
|
|
||||||
}
|
}
|
||||||
//push to the adapter
|
//push to the adapter
|
||||||
stepListAdapter.setItems(stepSessions, true);
|
stepListAdapter.setItems(stepSessions, true);
|
||||||
|
@ -30,24 +30,27 @@ import nodomain.freeyourgadget.gadgetbridge.model.ActivityUser;
|
|||||||
|
|
||||||
public class StepAnalysis {
|
public class StepAnalysis {
|
||||||
protected static final Logger LOG = LoggerFactory.getLogger(StepAnalysis.class);
|
protected static final Logger LOG = LoggerFactory.getLogger(StepAnalysis.class);
|
||||||
final double MULTIPLIER_FEMALE = 0.44; //constants to calculate steps from height
|
|
||||||
final double MULTIPLIER_OTHER = 0.45; //thes feel too small though
|
|
||||||
final double MULTIPLIER_MALE = 0.46;
|
|
||||||
private final double MIN_SESSION_INTENSITY = 0.4; //needs tuning
|
|
||||||
private double STEP_SIZE = 1;
|
|
||||||
|
|
||||||
public List<StepSession> calculateStepSessions(List<? extends ActivitySample> samples) {
|
public List<StepSession> calculateStepSessions(List<? extends ActivitySample> samples) {
|
||||||
List<StepSession> result = new ArrayList<>();
|
List<StepSession> result = new ArrayList<>();
|
||||||
|
ActivityUser activityUser = new ActivityUser();
|
||||||
|
double STEP_LENGTH_M;
|
||||||
final int MIN_SESSION_LENGTH = 60 * GBApplication.getPrefs().getInt("chart_list_min_session_length", 5);
|
final int MIN_SESSION_LENGTH = 60 * GBApplication.getPrefs().getInt("chart_list_min_session_length", 5);
|
||||||
final int MAX_IDLE_PHASE_LENGTH = 60 * GBApplication.getPrefs().getInt("chart_list_max_idle_phase_length", 5);
|
final int MAX_IDLE_PHASE_LENGTH = 60 * GBApplication.getPrefs().getInt("chart_list_max_idle_phase_length", 5);
|
||||||
final int MIN_STEPS_PER_MINUTE = GBApplication.getPrefs().getInt("chart_list_min_steps_per_minute", 40);
|
final int MIN_STEPS_PER_MINUTE = GBApplication.getPrefs().getInt("chart_list_min_steps_per_minute", 40);
|
||||||
final int GENDER = GBApplication.getPrefs().getInt("activity_user_gender", 2);
|
int stepLengthCm = activityUser.getStepLengthCm();
|
||||||
final int HEIGHT = GBApplication.getPrefs().getInt("activity_user_height_cm", 170);
|
int heightCm = activityUser.getHeightCm();
|
||||||
STEP_SIZE = calculate_step_size(GENDER, HEIGHT);
|
|
||||||
|
if (stepLengthCm == 0 && heightCm != 0) {
|
||||||
|
STEP_LENGTH_M = heightCm * 0.43 * 0.01;
|
||||||
|
} else {
|
||||||
|
STEP_LENGTH_M = stepLengthCm * 0.01;
|
||||||
|
}
|
||||||
|
final double MIN_SESSION_INTENSITY = Math.max(0, Math.min(1, MIN_STEPS_PER_MINUTE * 0.01));
|
||||||
|
|
||||||
ActivitySample previousSample = null;
|
ActivitySample previousSample = null;
|
||||||
Date sessionStart = null;
|
Date sessionStart = null;
|
||||||
Date sessionEnd = null;
|
Date sessionEnd;
|
||||||
int activeSteps = 0; //steps that we count
|
int activeSteps = 0; //steps that we count
|
||||||
int stepsBetweenActivePeriods = 0; //steps during time when we maybe take a rest but then restart
|
int stepsBetweenActivePeriods = 0; //steps during time when we maybe take a rest but then restart
|
||||||
int durationSinceLastActiveStep = 0;
|
int durationSinceLastActiveStep = 0;
|
||||||
@ -77,7 +80,7 @@ public class StepAnalysis {
|
|||||||
if (sessionStart == null) {
|
if (sessionStart == null) {
|
||||||
sessionStart = getDateFromSample(sample);
|
sessionStart = getDateFromSample(sample);
|
||||||
activeSteps = sample.getSteps();
|
activeSteps = sample.getSteps();
|
||||||
activeIntensity = (int) sample.getIntensity();
|
activeIntensity = sample.getIntensity();
|
||||||
heartRateForAverage = heartRateToAdd;
|
heartRateForAverage = heartRateToAdd;
|
||||||
activeHrSamplesForAverage = activeHrSamplesToAdd;
|
activeHrSamplesForAverage = activeHrSamplesToAdd;
|
||||||
durationSinceLastActiveStep = 0;
|
durationSinceLastActiveStep = 0;
|
||||||
@ -112,7 +115,7 @@ public class StepAnalysis {
|
|||||||
|
|
||||||
if (session_length >= MIN_SESSION_LENGTH) { //valid activity session
|
if (session_length >= MIN_SESSION_LENGTH) { //valid activity session
|
||||||
int heartRateAverage = activeHrSamplesForAverage > 0 ? heartRateForAverage / activeHrSamplesForAverage : 0;
|
int heartRateAverage = activeHrSamplesForAverage > 0 ? heartRateForAverage / activeHrSamplesForAverage : 0;
|
||||||
float distance = (float) (activeSteps * STEP_SIZE);
|
float distance = (float) (activeSteps * STEP_LENGTH_M);
|
||||||
sessionEnd = new Date((sample.getTimestamp() - durationSinceLastActiveStep) * 1000L);
|
sessionEnd = new Date((sample.getTimestamp() - durationSinceLastActiveStep) * 1000L);
|
||||||
activityKind = detect_activity_kind(session_length, activeSteps, heartRateAverage, activeIntensity);
|
activityKind = detect_activity_kind(session_length, activeSteps, heartRateAverage, activeIntensity);
|
||||||
result.add(new StepSession(sessionStart, sessionEnd, activeSteps, heartRateAverage, activeIntensity, distance, activityKind));
|
result.add(new StepSession(sessionStart, sessionEnd, activeSteps, heartRateAverage, activeIntensity, distance, activityKind));
|
||||||
@ -132,7 +135,7 @@ public class StepAnalysis {
|
|||||||
|
|
||||||
if (session_length >= MIN_SESSION_LENGTH) {
|
if (session_length >= MIN_SESSION_LENGTH) {
|
||||||
int heartRateAverage = activeHrSamplesForAverage > 0 ? heartRateForAverage / activeHrSamplesForAverage : 0;
|
int heartRateAverage = activeHrSamplesForAverage > 0 ? heartRateForAverage / activeHrSamplesForAverage : 0;
|
||||||
float distance = (float) (activeSteps * STEP_SIZE);
|
float distance = (float) (activeSteps * STEP_LENGTH_M);
|
||||||
sessionEnd = getDateFromSample(previousSample);
|
sessionEnd = getDateFromSample(previousSample);
|
||||||
activityKind = detect_activity_kind(session_length, activeSteps, heartRateAverage, activeIntensity);
|
activityKind = detect_activity_kind(session_length, activeSteps, heartRateAverage, activeIntensity);
|
||||||
result.add(new StepSession(sessionStart, sessionEnd, activeSteps, heartRateAverage, activeIntensity, distance, activityKind));
|
result.add(new StepSession(sessionStart, sessionEnd, activeSteps, heartRateAverage, activeIntensity, distance, activityKind));
|
||||||
@ -141,22 +144,6 @@ public class StepAnalysis {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private double calculate_step_size(int gender, int height) {
|
|
||||||
double multiplier = 0;
|
|
||||||
switch (gender) {
|
|
||||||
case ActivityUser.GENDER_MALE:
|
|
||||||
multiplier = MULTIPLIER_MALE;
|
|
||||||
break;
|
|
||||||
case ActivityUser.GENDER_FEMALE:
|
|
||||||
multiplier = MULTIPLIER_FEMALE;
|
|
||||||
break;
|
|
||||||
case ActivityUser.GENDER_OTHER:
|
|
||||||
multiplier = MULTIPLIER_OTHER;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return height * multiplier / 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
private int detect_activity_kind(int session_length, int activeSteps, int heartRateAverage, float intensity) {
|
private int detect_activity_kind(int session_length, int activeSteps, int heartRateAverage, float intensity) {
|
||||||
final int MIN_STEPS_PER_MINUTE_FOR_RUN = GBApplication.getPrefs().getInt("chart_list_min_steps_per_minute_for_run", 120);
|
final int MIN_STEPS_PER_MINUTE_FOR_RUN = GBApplication.getPrefs().getInt("chart_list_min_steps_per_minute_for_run", 120);
|
||||||
int spm = (int) (activeSteps / (session_length / 60));
|
int spm = (int) (activeSteps / (session_length / 60));
|
||||||
@ -166,7 +153,7 @@ public class StepAnalysis {
|
|||||||
if (activeSteps > 200) {
|
if (activeSteps > 200) {
|
||||||
return ActivityKind.TYPE_WALKING;
|
return ActivityKind.TYPE_WALKING;
|
||||||
}
|
}
|
||||||
if (heartRateAverage > 90 && intensity > 30) { //needs tuning
|
if (heartRateAverage > 90 && intensity > 15) { //needs tuning
|
||||||
return ActivityKind.TYPE_EXERCISE;
|
return ActivityKind.TYPE_EXERCISE;
|
||||||
}
|
}
|
||||||
return ActivityKind.TYPE_ACTIVITY;
|
return ActivityKind.TYPE_ACTIVITY;
|
||||||
|
@ -85,7 +85,7 @@ public abstract class AbstractActivityListingAdapter<T> extends ArrayAdapter<T>
|
|||||||
|
|
||||||
|
|
||||||
LinearLayout hrLayout = view.findViewById(R.id.line_layout_hr);
|
LinearLayout hrLayout = view.findViewById(R.id.line_layout_hr);
|
||||||
LinearLayout stepLayout = view.findViewById(R.id.line_layout_step);
|
LinearLayout distanceLayout = view.findViewById(R.id.line_layout_distance);
|
||||||
LinearLayout intensityLayout = view.findViewById(R.id.line_layout_intensity);
|
LinearLayout intensityLayout = view.findViewById(R.id.line_layout_intensity);
|
||||||
RelativeLayout parentLayout = view.findViewById(R.id.list_item_parent_layout);
|
RelativeLayout parentLayout = view.findViewById(R.id.list_item_parent_layout);
|
||||||
|
|
||||||
@ -112,6 +112,12 @@ public abstract class AbstractActivityListingAdapter<T> extends ArrayAdapter<T>
|
|||||||
intensityLayout.setVisibility(View.VISIBLE);
|
intensityLayout.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!hasDistance(item)) {
|
||||||
|
distanceLayout.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
distanceLayout.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
activityIcon.setImageResource(getIcon(item));
|
activityIcon.setImageResource(getIcon(item));
|
||||||
|
|
||||||
if (position % 2 == 0) {
|
if (position % 2 == 0) {
|
||||||
@ -141,6 +147,8 @@ public abstract class AbstractActivityListingAdapter<T> extends ArrayAdapter<T>
|
|||||||
|
|
||||||
protected abstract boolean hasIntensity(T item);
|
protected abstract boolean hasIntensity(T item);
|
||||||
|
|
||||||
|
protected abstract boolean hasDistance(T item);
|
||||||
|
|
||||||
@DrawableRes
|
@DrawableRes
|
||||||
protected abstract int getIcon(T item);
|
protected abstract int getIcon(T item);
|
||||||
|
|
||||||
|
@ -66,23 +66,18 @@ public abstract class AbstractItemAdapter<T> extends ArrayAdapter<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setDateFromFilter(long date){
|
public void setDateFromFilter(long date){
|
||||||
this.setDateFromFilter(date);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDateToFilter(long date){
|
public void setDateToFilter(long date){
|
||||||
this.setDateToFilter(date);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNameContainsFilter(String name){
|
public void setNameContainsFilter(String name){
|
||||||
this.setNameContainsFilter(name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setItemsFilter(List items) {
|
public void setItemsFilter(List items) {
|
||||||
this.setItemsFilter(items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDeviceFilter(long device) {
|
public void setDeviceFilter(long device) {
|
||||||
this.setDeviceFilter(device);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -44,6 +44,7 @@ public class ActivityUser {
|
|||||||
private int activityUserCaloriesBurnt;
|
private int activityUserCaloriesBurnt;
|
||||||
private int activityUserDistanceMeters;
|
private int activityUserDistanceMeters;
|
||||||
private int activityUserActiveTimeMinutes;
|
private int activityUserActiveTimeMinutes;
|
||||||
|
private int activityUserStepLengthCm;
|
||||||
|
|
||||||
private static final String defaultUserName = "gadgetbridge-user";
|
private static final String defaultUserName = "gadgetbridge-user";
|
||||||
public static final int defaultUserGender = GENDER_FEMALE;
|
public static final int defaultUserGender = GENDER_FEMALE;
|
||||||
@ -56,6 +57,7 @@ public class ActivityUser {
|
|||||||
public static final int defaultUserCaloriesBurnt = 2000;
|
public static final int defaultUserCaloriesBurnt = 2000;
|
||||||
public static final int defaultUserDistanceMeters = 5000;
|
public static final int defaultUserDistanceMeters = 5000;
|
||||||
public static final int defaultUserActiveTimeMinutes = 60;
|
public static final int defaultUserActiveTimeMinutes = 60;
|
||||||
|
public static final int defaultUserStepLengthCm = 0;
|
||||||
|
|
||||||
public static final String PREF_USER_NAME = "mi_user_alias";
|
public static final String PREF_USER_NAME = "mi_user_alias";
|
||||||
public static final String PREF_USER_YEAR_OF_BIRTH = "activity_user_year_of_birth";
|
public static final String PREF_USER_YEAR_OF_BIRTH = "activity_user_year_of_birth";
|
||||||
@ -67,6 +69,7 @@ public class ActivityUser {
|
|||||||
public static final String PREF_USER_CALORIES_BURNT = "activity_user_calories_burnt";
|
public static final String PREF_USER_CALORIES_BURNT = "activity_user_calories_burnt";
|
||||||
public static final String PREF_USER_DISTANCE_METERS = "activity_user_distance_meters";
|
public static final String PREF_USER_DISTANCE_METERS = "activity_user_distance_meters";
|
||||||
public static final String PREF_USER_ACTIVETIME_MINUTES = "activity_user_activetime_minutes";
|
public static final String PREF_USER_ACTIVETIME_MINUTES = "activity_user_activetime_minutes";
|
||||||
|
public static final String PREF_USER_STEP_LENGTH_CM = "activity_user_step_length_cm";
|
||||||
|
|
||||||
public ActivityUser() {
|
public ActivityUser() {
|
||||||
fetchPreferences();
|
fetchPreferences();
|
||||||
@ -97,6 +100,10 @@ public class ActivityUser {
|
|||||||
return activityUserHeightCm;
|
return activityUserHeightCm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getStepLengthCm() {
|
||||||
|
return activityUserStepLengthCm;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the user defined sleep duration or the default value when none is set or the stored
|
* @return the user defined sleep duration or the default value when none is set or the stored
|
||||||
* value is out of any logical bounds.
|
* value is out of any logical bounds.
|
||||||
@ -139,6 +146,7 @@ public class ActivityUser {
|
|||||||
activityUserCaloriesBurnt = prefs.getInt(PREF_USER_CALORIES_BURNT, defaultUserCaloriesBurnt);
|
activityUserCaloriesBurnt = prefs.getInt(PREF_USER_CALORIES_BURNT, defaultUserCaloriesBurnt);
|
||||||
activityUserDistanceMeters = prefs.getInt(PREF_USER_DISTANCE_METERS, defaultUserDistanceMeters);
|
activityUserDistanceMeters = prefs.getInt(PREF_USER_DISTANCE_METERS, defaultUserDistanceMeters);
|
||||||
activityUserActiveTimeMinutes = prefs.getInt(PREF_USER_ACTIVETIME_MINUTES, defaultUserActiveTimeMinutes);
|
activityUserActiveTimeMinutes = prefs.getInt(PREF_USER_ACTIVETIME_MINUTES, defaultUserActiveTimeMinutes);
|
||||||
|
activityUserStepLengthCm = prefs.getInt(PREF_USER_STEP_LENGTH_CM, defaultUserStepLengthCm);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getUserBirthday() {
|
public Date getUserBirthday() {
|
||||||
|
@ -1,15 +1,4 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="22.62dp" android:height="22.62dp" android:tint="#7E7E7E" android:viewportWidth="22.62" android:viewportHeight="22.62">
|
||||||
android:width="22.62dp"
|
<path android:pathData="M11.31 14.975a3.665 3.665 0 0 1-3.665-3.665 3.665 3.665 0 0 1 3.665-3.665 3.665 3.665 0 0 1 3.665 3.665 3.665 3.665 0 0 1-3.665 3.665m4.886-1.643l2.022-2.022-2.022-2.022V6.424h-2.864L11.31 4.402 9.288 6.424H6.424v2.864L4.402 11.31l2.022 2.022v2.864h2.864l2.022 2.022 2.022-2.022h2.864z" android:strokeWidth="2.82858" android:fillColor="#000000"/>
|
||||||
android:height="22.62dp"
|
<path android:pathData="M6.715 11.547H8.89l1.273-3.071 1.18 3.353 1.114-1.666h3.963l-0.298 0.847h-3.215l-1.795 2.755-0.978-2.777-0.58 1.468H7.411z" android:strokeWidth="1.63728" android:fillColor="#000000"/>
|
||||||
android:tint="#7E7E7E"
|
|
||||||
android:viewportWidth="22.62"
|
|
||||||
android:viewportHeight="22.62">
|
|
||||||
<path
|
|
||||||
android:pathData="m11.31,14.9746a3.6646,3.6646 0,0 1,-3.6646 -3.6646,3.6646 3.6646,0 0,1 3.6646,-3.6646 3.6646,3.6646 0,0 1,3.6646 3.6646,3.6646 3.6646,0 0,1 -3.6646,3.6646M16.1961,13.3316 L18.2178,11.31 16.1961,9.2884L16.1961,6.4239L13.3316,6.4239L11.31,4.4022 9.2884,6.4239L6.4239,6.4239L6.4239,9.2884L4.4022,11.31 6.4239,13.3316L6.4239,16.1961L9.2884,16.1961L11.31,18.2178 13.3316,16.1961L16.1961,16.1961Z"
|
|
||||||
android:strokeWidth="2.82858"
|
|
||||||
android:fillColor="#000000"/>
|
|
||||||
<path
|
|
||||||
android:pathData="m6.7147,11.5474l2.1754,0l1.2727,-3.0714 1.18,3.3527 1.1138,-1.6654l3.9633,0l-0.2981,0.8472L12.9074,11.0106l-1.795,2.754 -0.9785,-2.7764 -0.5806,1.4679 -2.1417,-0.0002z"
|
|
||||||
android:strokeWidth="1.63728"
|
|
||||||
android:fillColor="#000000"/>
|
|
||||||
</vector>
|
</vector>
|
||||||
|
5
app/src/main/res/drawable/ic_distance.xml
Normal file
5
app/src/main/res/drawable/ic_distance.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="19.38018dp" android:height="19.146656dp" android:viewportWidth="19.38018" android:tint="#7E7E7E" android:viewportHeight="19.146656">
|
||||||
|
<path android:fillColor="#FF000000" android:pathData="M6.08 11.546c-0.836 0-1.52-0.684-1.52-1.52s0.684-1.52 1.52-1.52S7.6 9.19 7.6 10.026s-0.683 1.52-1.52 1.52zm4.56-1.368c0-2.759-2.013-4.712-4.56-4.712-2.546 0-4.56 1.953-4.56 4.712 0 1.778 1.482 4.135 4.56 6.947 3.079-2.812 4.56-5.168 4.56-6.947zM6.08 3.946c3.193 0 6.08 2.447 6.08 6.232 0 2.523-2.029 5.51-6.08 8.969C2.03 15.688 0 12.7 0 10.178c0-3.785 2.888-6.232 6.08-6.232z" android:strokeWidth="1"/>
|
||||||
|
<path android:fillColor="#FF000000" android:pathData="M16.106 4.228c-0.422 0-0.766-0.345-0.766-0.766 0-0.422 0.345-0.767 0.766-0.767 0.421 0 0.766 0.345 0.766 0.767 0 0.42-0.345 0.766-0.766 0.766zm2.298-0.69c0-1.39-1.015-2.375-2.298-2.375-1.283 0-2.299 0.985-2.299 2.375 0 0.897 0.747 2.084 2.299 3.501 1.551-1.417 2.298-2.604 2.298-3.5zm-2.298-3.141c1.609 0 3.064 1.234 3.064 3.141 0 1.272-1.022 2.777-3.064 4.52-2.042-1.743-3.065-3.248-3.065-4.52 0-1.908 1.456-3.141 3.065-3.141z" android:strokeWidth="0.999999"/>
|
||||||
|
<path android:pathData="M8.4 18.047c17.527-4.835-0.051-6.796 6.62-10.262" android:strokeWidth="1" android:strokeColor="#000000" android:fillType="evenOdd"/>
|
||||||
|
</vector>
|
@ -1,10 +1,3 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:tint="#7E7E7E" android:viewportWidth="24" android:viewportHeight="24">
|
||||||
android:width="24dp"
|
<path android:fillColor="#000000" android:pathData="M4.25 5.61C6.57 8.59 10 13 10 13v5c0 1.1 0.9 2 2 2s2-0.9 2-2v-5s3.43-4.41 5.75-7.39C20.26 4.95 19.79 4 18.95 4H5.04c-0.83 0-1.3 0.95-0.79 1.61z"/>
|
||||||
android:height="24dp"
|
|
||||||
android:tint="#7E7E7E"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
<path
|
|
||||||
android:fillColor="#000000"
|
|
||||||
android:pathData="M4.25 5.61C6.57 8.59 10 13 10 13v5c0 1.1 0.9 2 2 2s2-0.9 2-2v-5s3.43-4.41 5.75-7.39C20.26 4.95 19.79 4 18.95 4H5.04c-0.83 0-1.3 0.95-0.79 1.61z" />
|
|
||||||
</vector>
|
</vector>
|
||||||
|
@ -1,16 +1,4 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
|
||||||
android:width="24dp"
|
<path android:fillColor="@color/secondarytext" android:pathData="M5.04 4c-0.83 0-1.3 0.95-0.79 1.61C6.27 8.2 10 13 10 13v6c0 0.55 0.45 1 1 1h2c0.55 0 1-0.45 1-1v-6l0.648-0.836a6.098 6.098 0 0 1-1.472-1.354L11.99 12.3 7 6h4.979a6.098 6.098 0 0 1 0.728-2H5.039z"/>
|
||||||
android:height="24dp"
|
<path android:pathData="M16.728 3.019v4.122h4.128V8.4h-4.128v4.123h-1.246V8.399h-4.128V7.141h4.128V3.02z" android:strokeWidth="0.420925" android:fillColor="@color/secondarytext"/>
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
<path
|
|
||||||
android:fillColor="@color/secondarytext"
|
|
||||||
android:pathData="M5.0391,4C4.2091,4 3.74,4.9494 4.25,5.6094C6.27,8.1994 10,13 10,13L10,19C10,19.55 10.45,20 11,20L13,20C13.55,20 14,19.55 14,19L14,13C14,13 14.5612,12.2766 14.6484,12.1641A6.0985,6.0985 0,0 1,13.1758 10.8105L11.9902,12.3008L7,6L11.9785,6A6.0985,6.0985 0,0 1,12.707 4L5.0391,4z"/>
|
|
||||||
<path
|
|
||||||
android:pathData="m16.7277,3.019l0,4.1223l4.1288,0L20.8565,8.3995L16.7277,8.3995L16.7277,12.5219L15.4824,12.5219L15.4824,8.3995L11.3537,8.3995L11.3537,7.1414L15.4824,7.1414L15.4824,3.019Z"
|
|
||||||
android:strokeLineJoin="miter"
|
|
||||||
android:strokeWidth="0.420925"
|
|
||||||
android:fillColor="@color/secondarytext"
|
|
||||||
android:strokeColor="#00000000"
|
|
||||||
android:strokeLineCap="butt"/>
|
|
||||||
</vector>
|
</vector>
|
||||||
|
@ -1,14 +1,4 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:tint="#7E7E7E" android:viewportHeight="24">
|
||||||
android:width="24dp"
|
<path android:fillColor="#FF000000" android:pathData="M16.5 3c-1.74 0-3.41 0.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3zm-4.4 15.55l-0.1 0.1-0.1-0.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04 0.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05z"/>
|
||||||
android:height="24dp"
|
<path android:pathData="M4.41 12.148h3.56l2.084-5.03 1.932 5.49 1.823-2.727h6.49L19.81 11.27h-5.263l-2.939 4.509-1.602-4.546-0.95 2.403H5.55z" android:strokeWidth="1" android:fillColor="#FF000000"/>
|
||||||
android:viewportWidth="24"
|
|
||||||
android:tint="#7E7E7E"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
<path
|
|
||||||
android:fillColor="#FF000000"
|
|
||||||
android:pathData="M16.5,3c-1.74,0 -3.41,0.81 -4.5,2.09C10.91,3.81 9.24,3 7.5,3 4.42,3 2,5.42 2,8.5c0,3.78 3.4,6.86 8.55,11.54L12,21.35l1.45,-1.32C18.6,15.36 22,12.28 22,8.5 22,5.42 19.58,3 16.5,3zM12.1,18.55l-0.1,0.1 -0.1,-0.1C7.14,14.24 4,11.39 4,8.5 4,6.5 5.5,5 7.5,5c1.54,0 3.04,0.99 3.57,2.36h1.87C13.46,5.99 14.96,5 16.5,5c2,0 3.5,1.5 3.5,3.5 0,2.89 -3.14,5.74 -7.9,10.05z"/>
|
|
||||||
<path
|
|
||||||
android:pathData="m4.4092,12.1476 l3.5618,0 2.0837,-5.0287 1.9321,5.4893 1.8236,-2.7268h6.489l-0.4881,1.3872 -5.263,0 -2.9389,4.5092 -1.602,-4.5457 -0.9506,2.4033 -3.5065,-0.0004z"
|
|
||||||
android:strokeWidth="1"
|
|
||||||
android:fillColor="#FF000000"/>
|
|
||||||
</vector>
|
</vector>
|
||||||
|
@ -1,15 +1,4 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="12.461885dp" android:height="20.465673dp" android:tint="#7E7E7E" android:viewportWidth="12.461885" android:viewportHeight="20.465673">
|
||||||
android:width="12.461885dp"
|
<path android:pathData="M0 14.087h3.18l1.694-6.144 1.893 6.726L8.67 3.775l3.79 10.312-0.117 3.574-3.24-9.045-1.897 11.85-2.303-7.953-0.753 3.454H1.018z" android:strokeWidth="0.791543" android:fillColor="#FF000000"/>
|
||||||
android:height="20.465673dp"
|
<path android:fillColor="#FF000000" android:pathData="M4.47 1.86C4.959 1.794 5.3 1.322 5.23 0.813 5.16 0.302 4.703-0.06 4.214 0.008c-0.489 0.068-0.831 0.54-0.76 1.05 0.07 0.509 0.528 0.87 1.017 0.803zM3.947 8.525L4.054 6.45l1.568 0.408 0.101 1.506 1.038-0.04-0.227-2.23-1.819-0.49 0.075-1.427c0.674 0.615 1.627 0.955 2.605 0.82L7.267 4.07c-0.845 0.117-1.62-0.248-2.065-0.847l-0.547-0.68C4.438 2.29 4.146 2.142 3.835 2.185 3.7 2.203 3.619 2.262 3.485 2.28L1.316 3.62l0.301 2.177 0.89-0.123-0.219-1.575 0.756-0.435-0.185 4.35-1.39 1.752 0.423 0.978z" android:strokeWidth="0.791547"/>
|
||||||
android:tint="#7E7E7E"
|
|
||||||
android:viewportWidth="12.461885"
|
|
||||||
android:viewportHeight="20.465673">
|
|
||||||
<path
|
|
||||||
android:pathData="M-0,14.0873L3.1807,14.0873L4.8739,7.9432 6.7669,14.6693 8.6712,3.7748 12.4619,14.0873 12.344,17.6608 9.1039,8.616 7.2066,20.4657 4.9037,12.5135 4.1505,15.967 1.0192,15.9665Z"
|
|
||||||
android:strokeWidth="0.791543"
|
|
||||||
android:fillColor="#FF000000"/>
|
|
||||||
<path
|
|
||||||
android:fillColor="#FF000000"
|
|
||||||
android:pathData="M4.4696,1.8609C4.9586,1.7933 5.301,1.3211 5.2306,0.8115 5.1601,0.302 4.7023,-0.0595 4.2133,0.0081 3.7243,0.0758 3.3819,0.548 3.4524,1.0575 3.5229,1.567 3.9806,1.9285 4.4696,1.8609ZM3.9469,8.524 L4.0536,6.4496 5.6225,6.858 5.7231,8.3636 6.7606,8.3246 6.5342,6.0945 4.7155,5.6033 4.79,4.1769c0.674,0.6148 1.6272,0.9551 2.6052,0.8198L7.267,4.0703C6.4224,4.1871 5.647,3.8223 5.2017,3.223L4.6546,2.5434C4.4384,2.2901 4.146,2.1417 3.8348,2.1847 3.7015,2.2032 3.619,2.2618 3.4856,2.2803L1.3149,3.619 1.6161,5.796 2.5052,5.6731 2.2873,4.0982 3.0427,3.6633 2.8579,8.0121 1.4681,9.7652 1.8905,10.7431Z"
|
|
||||||
android:strokeWidth="0.791547"/>
|
|
||||||
</vector>
|
</vector>
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24"
|
|
||||||
android:tint="#7E7E7E"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
android:fillColor="@android:color/white"
|
|
||||||
android:pathData="M12,12c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM18,10.2C18,6.57 15.35,4 12,4s-6,2.57 -6,6.2c0,2.34 1.95,5.44 6,9.14 4.05,-3.7 6,-6.8 6,-9.14zM12,2c4.2,0 8,3.22 8,8.2 0,3.32 -2.67,7.25 -8,11.8 -5.33,-4.55 -8,-8.48 -8,-11.8C4,5.22 7.8,2 12,2z"/>
|
|
||||||
</vector>
|
|
@ -1,10 +1,3 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:tint="#7E7E7E" android:viewportHeight="24">
|
||||||
android:width="24dp"
|
<path android:fillColor="#FF000000" android:pathData="M18.51 15.68l-1.41-1.41 4.48-4.48L23 11.2zm-4.325-2.621L18.05 9.08 13.8 4.82 9.925 8.799l-1.42-1.42L13.8 2l7.08 7.08-5.275 5.389zm1.055 2.201l-1.41 1.41L10.5 20H1v-2.63c0-0.84 0.52-1.57 1.3-1.88 0.58-0.23 1.28-0.56 1.97-1.02l1.38 1.38C5.74 15.95 5.87 16 6 16c0.13 0 0.26-0.05 0.36-0.15 0.2-0.2 0.2-0.51 0-0.71l-1.28-1.28c0.27-0.24 0.53-0.51 0.77-0.8l1.27 1.27c0.09 0.1 0.23 0.15 0.35 0.15 0.12 0 0.25-0.05 0.35-0.15 0.2-0.2 0.2-0.51 0-0.71l-1.4-1.4c0.19-0.34 0.34-0.72 0.45-1.12l1.71 1.72c0.09 0.1 0.23 0.15 0.35 0.15 0.12 0 0.25-0.05 0.35-0.15 0.19-0.2 0.19-0.5 0.01-0.7L6.919 9.747l1.42-1.41zm-2.82 0l-1.67-1.68-3.33 3.32c-0.78 0.78-2.05 0.78-2.83-0.01L4.4 16.72l-0.47 0.24c-0.29 0.14-0.59 0.27-0.89 0.39L3.03 18h6.64z"/>
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:tint="#7E7E7E"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
<path
|
|
||||||
android:fillColor="#FF000000"
|
|
||||||
android:pathData="M18.51,15.68 L17.1,14.27 21.58,9.79 23,11.2ZM14.1852,13.0589 L18.05,9.08 13.8,4.82 9.9252,8.7989l-1.42,-1.42L13.8,2v0l7.08,7.08 -5.2748,5.3889zM15.24,15.26 L13.83,16.67v0L10.5,20L1,20L1,17.37C1,16.53 1.52,15.8 2.3,15.49 2.88,15.26 3.58,14.93 4.27,14.47l1.38,1.38C5.74,15.95 5.87,16 6,16c0.13,0 0.26,-0.05 0.36,-0.15 0.2,-0.2 0.2,-0.51 0,-0.71L5.08,13.86c0.27,-0.24 0.53,-0.51 0.77,-0.8l1.27,1.27c0.09,0.1 0.23,0.15 0.35,0.15 0.12,0 0.25,-0.05 0.35,-0.15 0.2,-0.2 0.2,-0.51 0,-0.71l-1.4,-1.4C6.61,11.88 6.76,11.5 6.87,11.1l1.71,1.72c0.09,0.1 0.23,0.15 0.35,0.15 0.12,0 0.25,-0.05 0.35,-0.15 0.19,-0.2 0.19,-0.5 0.01,-0.7l-2.3711,-2.3726 1.42,-1.41zM12.42,15.26 L10.75,13.58 7.42,16.9C6.64,17.68 5.37,17.68 4.59,16.89L4.4,16.72 3.93,16.96C3.64,17.1 3.34,17.23 3.04,17.35L3.03,18h6.64z"/>
|
|
||||||
</vector>
|
</vector>
|
||||||
|
@ -172,7 +172,7 @@
|
|||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_gravity="start"
|
android:layout_gravity="start"
|
||||||
android:contentDescription="@string/candidate_item_device_image"
|
android:contentDescription="@string/candidate_item_device_image"
|
||||||
app:srcCompat="@drawable/ic_place" />
|
app:srcCompat="@drawable/ic_distance" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/line_layout_distance_label"
|
android:id="@+id/line_layout_distance_label"
|
||||||
|
@ -599,6 +599,7 @@
|
|||||||
<string name="activity_prefs_gender">Gender</string>
|
<string name="activity_prefs_gender">Gender</string>
|
||||||
<string name="activity_prefs_height_cm">Height in cm</string>
|
<string name="activity_prefs_height_cm">Height in cm</string>
|
||||||
<string name="activity_prefs_weight_kg">Weight in kg</string>
|
<string name="activity_prefs_weight_kg">Weight in kg</string>
|
||||||
|
<string name="activity_prefs_step_length_cm">Step length in cm</string>
|
||||||
<!-- Settings - Charts Preferences -->
|
<!-- Settings - Charts Preferences -->
|
||||||
<string name="pref_header_charts">Charts Settings</string>
|
<string name="pref_header_charts">Charts Settings</string>
|
||||||
<string name="pref_title_charts_swipe">Enable left/right swipe in the charts activity</string>
|
<string name="pref_title_charts_swipe">Enable left/right swipe in the charts activity</string>
|
||||||
|
@ -136,6 +136,12 @@
|
|||||||
android:maxLength="3"
|
android:maxLength="3"
|
||||||
android:title="@string/activity_prefs_weight_kg" />
|
android:title="@string/activity_prefs_weight_kg" />
|
||||||
|
|
||||||
|
<EditTextPreference
|
||||||
|
android:inputType="number"
|
||||||
|
android:key="activity_user_step_length_cm"
|
||||||
|
android:maxLength="3"
|
||||||
|
android:title="@string/activity_prefs_step_length_cm" />
|
||||||
|
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
android:defaultValue="10000"
|
android:defaultValue="10000"
|
||||||
android:inputType="number"
|
android:inputType="number"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user