mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-13 12:14:19 +02:00
refactored measurement views for dynamically programming.
This commit is contained in:
@@ -2,15 +2,14 @@ package com.health.openscale.core;
|
|||||||
|
|
||||||
public class ScaleCalculator {
|
public class ScaleCalculator {
|
||||||
|
|
||||||
public float weight;
|
private float weight;
|
||||||
public float fat;
|
private float fat;
|
||||||
public float water;
|
private float water;
|
||||||
public float muscle;
|
private float muscle;
|
||||||
public float waist;
|
private float waist;
|
||||||
public float hip;
|
private float hip;
|
||||||
public int body_height;
|
|
||||||
|
|
||||||
public void setScaleData(ScaleData scaleData) {
|
public ScaleCalculator(ScaleData scaleData) {
|
||||||
weight = scaleData.weight;
|
weight = scaleData.weight;
|
||||||
fat = scaleData.fat;
|
fat = scaleData.fat;
|
||||||
water = scaleData.water;
|
water = scaleData.water;
|
||||||
@@ -19,11 +18,11 @@ public class ScaleCalculator {
|
|||||||
hip = scaleData.hip;
|
hip = scaleData.hip;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getBMI() {
|
public float getBMI(int body_height) {
|
||||||
return weight / ((body_height / 100.0f)*(body_height / 100.0f));
|
return weight / ((body_height / 100.0f)*(body_height / 100.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getWHtR() {
|
public float getWHtR(int body_height) {
|
||||||
return waist / (float)body_height;
|
return waist / (float)body_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,684 +0,0 @@
|
|||||||
package com.health.openscale.gui;
|
|
||||||
|
|
||||||
import android.content.SharedPreferences;
|
|
||||||
import android.graphics.Color;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.TableLayout;
|
|
||||||
import android.widget.TableRow;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import com.health.openscale.R;
|
|
||||||
import com.health.openscale.core.EvaluationResult;
|
|
||||||
import com.health.openscale.core.EvaluationSheet;
|
|
||||||
import com.health.openscale.core.ScaleUser;
|
|
||||||
|
|
||||||
import lecho.lib.hellocharts.util.ChartUtils;
|
|
||||||
|
|
||||||
abstract class Measurement {
|
|
||||||
private TextView txtLabel;
|
|
||||||
private TextView txtView;
|
|
||||||
private final String label;
|
|
||||||
private LinearGaugeView linearGaugeView;
|
|
||||||
private ImageView imageView;
|
|
||||||
private TableRow tableRow;
|
|
||||||
|
|
||||||
ScaleUser scaleUser;
|
|
||||||
|
|
||||||
public Measurement(View overviewView) {
|
|
||||||
txtLabel = (TextView) overviewView.findViewById(getTxtLabelId());
|
|
||||||
txtView = (TextView) overviewView.findViewById(getTxtViewId());
|
|
||||||
linearGaugeView = (LinearGaugeView) overviewView.findViewById(getLinearGaugeViewId());
|
|
||||||
imageView = (ImageView)overviewView.findViewById(getImageViewId());
|
|
||||||
|
|
||||||
label = overviewView.getResources().getString(getLabelId());
|
|
||||||
|
|
||||||
tableRow = (TableRow)overviewView.findViewById(getTableRowId());
|
|
||||||
tableRow.setOnClickListener(new onClickListenerEvaluation());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateValue(float value) {
|
|
||||||
setText(value);
|
|
||||||
evaluate(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract int getTxtLabelId();
|
|
||||||
abstract int getTxtViewId();
|
|
||||||
abstract int getLabelId();
|
|
||||||
abstract int getLinearGaugeViewId();
|
|
||||||
abstract int getImageViewId();
|
|
||||||
abstract int getTableRowId();
|
|
||||||
|
|
||||||
abstract String getFormat();
|
|
||||||
|
|
||||||
abstract EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value);
|
|
||||||
|
|
||||||
abstract float getMinValue();
|
|
||||||
|
|
||||||
abstract float getMaxValue();
|
|
||||||
|
|
||||||
private void setText(float value) {
|
|
||||||
txtView.setText(String.format(getFormat(), value));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void evaluate(float value) {
|
|
||||||
EvaluationSheet evalSheet = new EvaluationSheet(scaleUser);
|
|
||||||
EvaluationResult evalResult = evaluateSheet(evalSheet, value);
|
|
||||||
|
|
||||||
linearGaugeView.setMinMaxValue(getMinValue(), getMaxValue());
|
|
||||||
linearGaugeView.setLimits(evalResult.lowLimit, evalResult.highLimit);
|
|
||||||
linearGaugeView.setValue(value);
|
|
||||||
|
|
||||||
switch(evalResult.eval_state)
|
|
||||||
{
|
|
||||||
case LOW:
|
|
||||||
imageView.setBackgroundColor(ChartUtils.COLOR_BLUE);
|
|
||||||
break;
|
|
||||||
case NORMAL:
|
|
||||||
imageView.setBackgroundColor(ChartUtils.COLOR_GREEN);
|
|
||||||
break;
|
|
||||||
case HIGH:
|
|
||||||
imageView.setBackgroundColor(ChartUtils.COLOR_RED);
|
|
||||||
break;
|
|
||||||
case UNDEFINED:
|
|
||||||
imageView.setBackgroundColor(Color.GRAY);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDiff(float value, float diffValue) {
|
|
||||||
ScaleDiff.setDiff(
|
|
||||||
txtLabel,
|
|
||||||
value - diffValue,
|
|
||||||
label,
|
|
||||||
getFormat());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateVisibleRow(SharedPreferences preferences){
|
|
||||||
if(isPreferenceSet(preferences)) {
|
|
||||||
tableRow.setVisibility(View.VISIBLE);
|
|
||||||
} else {
|
|
||||||
tableRow.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract boolean isPreferenceSet(SharedPreferences preferences);
|
|
||||||
|
|
||||||
private class onClickListenerEvaluation implements View.OnClickListener {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
TableRow row = (TableRow)v;
|
|
||||||
|
|
||||||
TableLayout tableLayout = (TableLayout)row.getParent();
|
|
||||||
int index = tableLayout.indexOfChild(row);
|
|
||||||
|
|
||||||
TableRow rowEvaluation = (TableRow)tableLayout.getChildAt(index+1);
|
|
||||||
|
|
||||||
if (rowEvaluation.getVisibility() == View.VISIBLE) {
|
|
||||||
rowEvaluation.setVisibility(View.GONE);
|
|
||||||
} else {
|
|
||||||
rowEvaluation.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class WeightMeasurement extends Measurement {
|
|
||||||
|
|
||||||
public WeightMeasurement(View overviewView) {
|
|
||||||
super(overviewView);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTxtLabelId() {
|
|
||||||
return R.id.txtLabelWeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTxtViewId() {
|
|
||||||
return R.id.txtWeightLast;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getLabelId() {
|
|
||||||
return R.string.label_weight;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getLinearGaugeViewId() {
|
|
||||||
return R.id.linearGaugeWeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getImageViewId() {
|
|
||||||
return R.id.indicatorWeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTableRowId() {
|
|
||||||
return R.id.tableRowWeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
String getFormat() {
|
|
||||||
return "%.1f " + ScaleUser.UNIT_STRING[scaleUser.scale_unit];
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
boolean isPreferenceSet(SharedPreferences preferences) {
|
|
||||||
return preferences.getBoolean("weightEnable", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value) {
|
|
||||||
return evalSheet.evaluateWeight(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
float getMinValue() {
|
|
||||||
return 30;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
float getMaxValue() {
|
|
||||||
return 300;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class BMIMeasurement extends Measurement {
|
|
||||||
|
|
||||||
public BMIMeasurement(View overviewView) {
|
|
||||||
super(overviewView);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTxtLabelId() {
|
|
||||||
return R.id.txtLabelBMI;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTxtViewId() {
|
|
||||||
return R.id.txtBMILast;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getLabelId() {
|
|
||||||
return R.string.label_bmi;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getLinearGaugeViewId() {
|
|
||||||
return R.id.linearGaugeBMI;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getImageViewId() {
|
|
||||||
return R.id.indicatorBMI;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTableRowId() {
|
|
||||||
return R.id.tableRowBMI;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
String getFormat() {
|
|
||||||
return "%.1f";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
boolean isPreferenceSet(SharedPreferences preferences) {
|
|
||||||
// TODO implement
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value) {
|
|
||||||
return evalSheet.evaluateBMI(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
float getMinValue() {
|
|
||||||
return 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
float getMaxValue() {
|
|
||||||
return 50;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class WaterMeasurement extends Measurement {
|
|
||||||
|
|
||||||
public WaterMeasurement(View overviewView) {
|
|
||||||
super(overviewView);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTxtLabelId() {
|
|
||||||
return R.id.txtLabelWater;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTxtViewId() {
|
|
||||||
return R.id.txtWaterLast;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getLabelId() {
|
|
||||||
return R.string.label_water;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getLinearGaugeViewId() {
|
|
||||||
return R.id.linearGaugeWater;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getImageViewId() {
|
|
||||||
return R.id.indicatorWater;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTableRowId() {
|
|
||||||
return R.id.tableRowWater;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
String getFormat() {
|
|
||||||
return "%.1f %%";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
boolean isPreferenceSet(SharedPreferences preferences) {
|
|
||||||
return preferences.getBoolean("waterEnable", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value) {
|
|
||||||
return evalSheet.evaluateBodyWater(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
float getMinValue() {
|
|
||||||
return 30;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
float getMaxValue() {
|
|
||||||
return 80;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class MuscleMeasurement extends Measurement {
|
|
||||||
|
|
||||||
public MuscleMeasurement(View overviewView) {
|
|
||||||
super(overviewView);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTxtLabelId() {
|
|
||||||
return R.id.txtLabelMuscle;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTxtViewId() {
|
|
||||||
return R.id.txtMuscleLast;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getLabelId() {
|
|
||||||
return R.string.label_muscle;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getLinearGaugeViewId() {
|
|
||||||
return R.id.linearGaugeMuscle;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getImageViewId() {
|
|
||||||
return R.id.indicatorMuscle;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTableRowId() {
|
|
||||||
return R.id.tableRowMuscle;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
String getFormat() {
|
|
||||||
return "%.1f %%";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
boolean isPreferenceSet(SharedPreferences preferences) {
|
|
||||||
return preferences.getBoolean("muscleEnable", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value) {
|
|
||||||
return evalSheet.evaluateBodyMuscle(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
float getMinValue() {
|
|
||||||
return 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
float getMaxValue() {
|
|
||||||
return 80;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class FatMeasurement extends Measurement {
|
|
||||||
|
|
||||||
public FatMeasurement(View overviewView) {
|
|
||||||
super(overviewView);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTxtLabelId() {
|
|
||||||
return R.id.txtLabelFat;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTxtViewId() {
|
|
||||||
return R.id.txtFatLast;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getLabelId() {
|
|
||||||
return R.string.label_fat;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getLinearGaugeViewId() {
|
|
||||||
return R.id.linearGaugeFat;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getImageViewId() {
|
|
||||||
return R.id.indicatorFat;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTableRowId() {
|
|
||||||
return R.id.tableRowFat;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
String getFormat() {
|
|
||||||
return "%.1f %%";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
boolean isPreferenceSet(SharedPreferences preferences) {
|
|
||||||
return preferences.getBoolean("fatEnable", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value) {
|
|
||||||
return evalSheet.evaluateBodyFat(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
float getMinValue() {
|
|
||||||
return 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
float getMaxValue() {
|
|
||||||
return 40;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class WaistMeasurement extends Measurement {
|
|
||||||
|
|
||||||
public WaistMeasurement(View overviewView) {
|
|
||||||
super(overviewView);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTxtLabelId() {
|
|
||||||
return R.id.txtLabelWaist;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTxtViewId() {
|
|
||||||
return R.id.txtWaistLast;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getLabelId() {
|
|
||||||
return R.string.label_waist;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getLinearGaugeViewId() {
|
|
||||||
return R.id.linearGaugeWaist;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getImageViewId() {
|
|
||||||
return R.id.indicatorWaist;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTableRowId() {
|
|
||||||
return R.id.tableRowWaist;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
String getFormat() {
|
|
||||||
return "%.1f cm";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
boolean isPreferenceSet(SharedPreferences preferences) {
|
|
||||||
return preferences.getBoolean("waistEnable", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value) {
|
|
||||||
return evalSheet.evaluateWaist(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
float getMinValue() {
|
|
||||||
return 30;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
float getMaxValue() {
|
|
||||||
return 200;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class WHtRMeasurement extends Measurement {
|
|
||||||
|
|
||||||
public WHtRMeasurement(View overviewView) {
|
|
||||||
super(overviewView);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTxtLabelId() {
|
|
||||||
return R.id.txtLabelWHtR;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTxtViewId() {
|
|
||||||
return R.id.txtWHtRLast;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getLabelId() {
|
|
||||||
return R.string.label_whtr;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getLinearGaugeViewId() {
|
|
||||||
return R.id.linearGaugeWHtR;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getImageViewId() {
|
|
||||||
return R.id.indicatorWHtR;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTableRowId() {
|
|
||||||
return R.id.tableRowWHtR;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
String getFormat() {
|
|
||||||
return "%.2f";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
boolean isPreferenceSet(SharedPreferences preferences) {
|
|
||||||
return preferences.getBoolean("waistEnable", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value) {
|
|
||||||
return evalSheet.evaluateWHtR(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
float getMinValue() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
float getMaxValue() {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class HipMeasurement extends Measurement {
|
|
||||||
|
|
||||||
public HipMeasurement(View overviewView) {
|
|
||||||
super(overviewView);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTxtLabelId() {
|
|
||||||
return R.id.txtLabelHip;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTxtViewId() {
|
|
||||||
return R.id.txtHipLast;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getLabelId() {
|
|
||||||
return R.string.label_hip;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getLinearGaugeViewId() {
|
|
||||||
return R.id.linearGaugeHip;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getImageViewId() {
|
|
||||||
return R.id.indicatorHip;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTableRowId() {
|
|
||||||
return R.id.tableRowHip;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
String getFormat() {
|
|
||||||
return "%.1f cm";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
boolean isPreferenceSet(SharedPreferences preferences) {
|
|
||||||
return preferences.getBoolean("hipEnable", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value) {
|
|
||||||
return evalSheet.evaluateHip(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
float getMinValue() {
|
|
||||||
return 30;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
float getMaxValue() {
|
|
||||||
return 200;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class WHRMeasurement extends Measurement {
|
|
||||||
|
|
||||||
public WHRMeasurement(View overviewView) {
|
|
||||||
super(overviewView);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTxtLabelId() {
|
|
||||||
return R.id.txtLabelWHR;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTxtViewId() {
|
|
||||||
return R.id.txtWHRLast;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getLabelId() {
|
|
||||||
return R.string.label_whr;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getLinearGaugeViewId() {
|
|
||||||
return R.id.linearGaugeWHR;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getImageViewId() {
|
|
||||||
return R.id.indicatorWHR;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
int getTableRowId() {
|
|
||||||
return R.id.tableRowWHR;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
String getFormat() {
|
|
||||||
return "%.2f";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
boolean isPreferenceSet(SharedPreferences preferences) {
|
|
||||||
return preferences.getBoolean("hipEnable", true) && preferences.getBoolean("waistEnable", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value) {
|
|
||||||
return evalSheet.evaluateWHR(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
float getMinValue() {
|
|
||||||
return 0.5f;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
float getMaxValue() {
|
|
||||||
return 1.5f;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -0,0 +1,571 @@
|
|||||||
|
package com.health.openscale.gui;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.support.v4.content.ContextCompat;
|
||||||
|
import android.text.Html;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.Space;
|
||||||
|
import android.widget.TableLayout;
|
||||||
|
import android.widget.TableRow;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.health.openscale.R;
|
||||||
|
import com.health.openscale.core.EvaluationResult;
|
||||||
|
import com.health.openscale.core.EvaluationSheet;
|
||||||
|
import com.health.openscale.core.ScaleCalculator;
|
||||||
|
import com.health.openscale.core.ScaleData;
|
||||||
|
import com.health.openscale.core.ScaleUser;
|
||||||
|
|
||||||
|
import lecho.lib.hellocharts.util.ChartUtils;
|
||||||
|
|
||||||
|
abstract class MeasurementView extends TableLayout {
|
||||||
|
private static String SYMBOL_UP = "↗";
|
||||||
|
private static String SYMBOL_DOWN = "↘";
|
||||||
|
|
||||||
|
private TableRow measurementRow;
|
||||||
|
private ImageView iconView;
|
||||||
|
private TextView nameView;
|
||||||
|
private TextView valueView;
|
||||||
|
private ImageView indicatorView;
|
||||||
|
|
||||||
|
private TableRow evaluatorRow;
|
||||||
|
private LinearGaugeView evaluatorView;
|
||||||
|
|
||||||
|
private String nameText;
|
||||||
|
|
||||||
|
protected ScaleUser scaleUser;
|
||||||
|
|
||||||
|
public MeasurementView(Context context, String text, Drawable icon) {
|
||||||
|
super(context);
|
||||||
|
initView(context);
|
||||||
|
|
||||||
|
nameText = text;
|
||||||
|
nameView.setText(text);
|
||||||
|
iconView.setImageDrawable(icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView(Context context) {
|
||||||
|
measurementRow = new TableRow(context);
|
||||||
|
|
||||||
|
iconView = new ImageView(context);
|
||||||
|
nameView = new TextView(context);
|
||||||
|
valueView = new TextView(context);
|
||||||
|
indicatorView = new ImageView(context);
|
||||||
|
|
||||||
|
evaluatorRow = new TableRow(context);
|
||||||
|
evaluatorView = new LinearGaugeView(context);
|
||||||
|
|
||||||
|
|
||||||
|
measurementRow.setLayoutParams(new TableRow.LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT, 1.0f));
|
||||||
|
measurementRow.addView(iconView);
|
||||||
|
measurementRow.addView(nameView);
|
||||||
|
measurementRow.addView(valueView);
|
||||||
|
measurementRow.addView(indicatorView);
|
||||||
|
|
||||||
|
addView(measurementRow);
|
||||||
|
addView(evaluatorRow);
|
||||||
|
|
||||||
|
iconView.getLayoutParams().height = 80;
|
||||||
|
iconView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
|
||||||
|
|
||||||
|
nameView.setTextSize(20);
|
||||||
|
nameView.setTextColor(Color.BLACK);
|
||||||
|
nameView.setLines(2);
|
||||||
|
nameView.setLayoutParams(new TableRow.LayoutParams(0, LayoutParams.WRAP_CONTENT, 0.92f));
|
||||||
|
|
||||||
|
valueView.setTextSize(20);
|
||||||
|
valueView.setTextColor(Color.BLACK);
|
||||||
|
valueView.setLayoutParams(new TableRow.LayoutParams(0, LayoutParams.MATCH_PARENT, 0.07f));
|
||||||
|
|
||||||
|
indicatorView.setLayoutParams(new TableRow.LayoutParams(0, LayoutParams.MATCH_PARENT, 0.01f));
|
||||||
|
indicatorView.setBackgroundColor(Color.GRAY);
|
||||||
|
|
||||||
|
evaluatorRow.setLayoutParams(new TableRow.LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT, 1.0f));
|
||||||
|
evaluatorRow.addView(new Space(context));
|
||||||
|
evaluatorRow.addView(evaluatorView);
|
||||||
|
Space spaceAfterEvaluatorView = new Space(context);
|
||||||
|
evaluatorRow.addView(spaceAfterEvaluatorView);
|
||||||
|
evaluatorRow.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
evaluatorView.setLayoutParams(new TableRow.LayoutParams(0, LayoutParams.WRAP_CONTENT, 0.99f));
|
||||||
|
spaceAfterEvaluatorView.setLayoutParams(new TableRow.LayoutParams(0, LayoutParams.WRAP_CONTENT, 0.01f));
|
||||||
|
|
||||||
|
measurementRow.setOnClickListener(new onClickListenerEvaluation());
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract void updateValue(ScaleData updateData);
|
||||||
|
abstract void updateDiff(ScaleData updateData, ScaleData lastData);
|
||||||
|
abstract void updatePreferences(SharedPreferences preferences);
|
||||||
|
abstract String getFormat();
|
||||||
|
abstract EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value);
|
||||||
|
abstract float getMinValue();
|
||||||
|
abstract float getMaxValue();
|
||||||
|
|
||||||
|
protected void setValueOnView(float value) {
|
||||||
|
valueView.setText(String.format(getFormat(), value));
|
||||||
|
evaluate(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setDiffOnView(float value, float lastValue) {
|
||||||
|
float diffValue = value - lastValue;
|
||||||
|
|
||||||
|
String symbol;
|
||||||
|
|
||||||
|
if (diffValue > 0.0) {
|
||||||
|
symbol = SYMBOL_UP;
|
||||||
|
} else {
|
||||||
|
symbol = SYMBOL_DOWN;
|
||||||
|
}
|
||||||
|
|
||||||
|
nameView.setText(
|
||||||
|
Html.fromHtml(
|
||||||
|
nameText +
|
||||||
|
" <br> <font color='grey'>" +
|
||||||
|
symbol +
|
||||||
|
"<small> " +
|
||||||
|
String.format(getFormat(), diffValue) +
|
||||||
|
"</small></font>"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setVisible(boolean isVisible){
|
||||||
|
if(isVisible) {
|
||||||
|
measurementRow.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
measurementRow.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void evaluate(float value) {
|
||||||
|
EvaluationSheet evalSheet = new EvaluationSheet(scaleUser);
|
||||||
|
EvaluationResult evalResult = evaluateSheet(evalSheet, value);
|
||||||
|
|
||||||
|
evaluatorView.setMinMaxValue(getMinValue(), getMaxValue());
|
||||||
|
evaluatorView.setLimits(evalResult.lowLimit, evalResult.highLimit);
|
||||||
|
evaluatorView.setValue(value);
|
||||||
|
|
||||||
|
switch(evalResult.eval_state)
|
||||||
|
{
|
||||||
|
case LOW:
|
||||||
|
indicatorView.setBackgroundColor(ChartUtils.COLOR_BLUE);
|
||||||
|
break;
|
||||||
|
case NORMAL:
|
||||||
|
indicatorView.setBackgroundColor(ChartUtils.COLOR_GREEN);
|
||||||
|
break;
|
||||||
|
case HIGH:
|
||||||
|
indicatorView.setBackgroundColor(ChartUtils.COLOR_RED);
|
||||||
|
break;
|
||||||
|
case UNDEFINED:
|
||||||
|
indicatorView.setBackgroundColor(Color.GRAY);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateScaleUser(ScaleUser user) {
|
||||||
|
scaleUser = user;
|
||||||
|
}
|
||||||
|
|
||||||
|
private class onClickListenerEvaluation implements View.OnClickListener {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if (evaluatorRow.getVisibility() == View.VISIBLE) {
|
||||||
|
evaluatorRow.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
evaluatorRow.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class WeightMeasurementView extends MeasurementView {
|
||||||
|
|
||||||
|
public WeightMeasurementView(Context context) {
|
||||||
|
super(context, context.getResources().getString(R.string.label_weight), ContextCompat.getDrawable(context, R.drawable.weight));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updateValue(ScaleData updateData) {
|
||||||
|
setValueOnView(updateData.weight);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updateDiff(ScaleData updateData, ScaleData lastData) {
|
||||||
|
setDiffOnView(updateData.weight, lastData.weight);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
String getFormat() {
|
||||||
|
return "%.1f " + ScaleUser.UNIT_STRING[scaleUser.scale_unit];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updatePreferences(SharedPreferences preferences) {
|
||||||
|
setVisible(preferences.getBoolean("weightEnable", true));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value) {
|
||||||
|
return evalSheet.evaluateWeight(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
float getMinValue() {
|
||||||
|
return 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
float getMaxValue() {
|
||||||
|
return 300;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BMIMeasurementView extends MeasurementView {
|
||||||
|
|
||||||
|
public BMIMeasurementView(Context context) {
|
||||||
|
super(context, context.getResources().getString(R.string.label_bmi), ContextCompat.getDrawable(context, R.drawable.bmi));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updateValue(ScaleData updateData) {
|
||||||
|
ScaleCalculator updateCalculator = new ScaleCalculator(updateData);
|
||||||
|
setValueOnView(updateCalculator.getBMI(scaleUser.body_height));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updateDiff(ScaleData updateData, ScaleData lastData) {
|
||||||
|
ScaleCalculator updateCalculator = new ScaleCalculator(updateData);
|
||||||
|
ScaleCalculator lastCalculator = new ScaleCalculator(lastData);
|
||||||
|
setDiffOnView(updateCalculator.getBMI(scaleUser.body_height), lastCalculator.getBMI(scaleUser.body_height));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
String getFormat() {
|
||||||
|
return "%.1f";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value) {
|
||||||
|
return evalSheet.evaluateBMI(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
float getMinValue() {
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
float getMaxValue() {
|
||||||
|
return 50;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updatePreferences(SharedPreferences preferences) {
|
||||||
|
setVisible(preferences.getBoolean("weightEnable", true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class WaterMeasurementView extends MeasurementView {
|
||||||
|
|
||||||
|
public WaterMeasurementView(Context context) {
|
||||||
|
super(context, context.getResources().getString(R.string.label_water), ContextCompat.getDrawable(context, R.drawable.water));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updateValue(ScaleData updateData) {
|
||||||
|
setValueOnView(updateData.water);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updateDiff(ScaleData updateData, ScaleData lastData) {
|
||||||
|
setDiffOnView(updateData.water, lastData.water);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
String getFormat() {
|
||||||
|
return "%.1f %%";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updatePreferences(SharedPreferences preferences) {
|
||||||
|
setVisible(preferences.getBoolean("waterEnable", true));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value) {
|
||||||
|
return evalSheet.evaluateBodyWater(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
float getMinValue() {
|
||||||
|
return 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
float getMaxValue() {
|
||||||
|
return 80;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MuscleMeasurementView extends MeasurementView {
|
||||||
|
|
||||||
|
public MuscleMeasurementView(Context context) {
|
||||||
|
super(context, context.getResources().getString(R.string.label_muscle), ContextCompat.getDrawable(context, R.drawable.muscle));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updateValue(ScaleData updateData) {
|
||||||
|
setValueOnView(updateData.muscle);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updateDiff(ScaleData updateData, ScaleData lastData) {
|
||||||
|
setDiffOnView(updateData.muscle, lastData.muscle);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
String getFormat() {
|
||||||
|
return "%.1f %%";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updatePreferences(SharedPreferences preferences) {
|
||||||
|
setVisible(preferences.getBoolean("muscleEnable", true));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value) {
|
||||||
|
return evalSheet.evaluateBodyMuscle(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
float getMinValue() {
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
float getMaxValue() {
|
||||||
|
return 80;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class FatMeasurementView extends MeasurementView {
|
||||||
|
|
||||||
|
public FatMeasurementView(Context context) {
|
||||||
|
super(context, context.getResources().getString(R.string.label_fat), ContextCompat.getDrawable(context, R.drawable.fat));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updateValue(ScaleData updateData) {
|
||||||
|
setValueOnView(updateData.fat);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updateDiff(ScaleData updateData, ScaleData lastData) {
|
||||||
|
setDiffOnView(updateData.fat, lastData.fat);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
String getFormat() {
|
||||||
|
return "%.1f %%";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updatePreferences(SharedPreferences preferences) {
|
||||||
|
setVisible(preferences.getBoolean("fatEnable", true));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value) {
|
||||||
|
return evalSheet.evaluateBodyFat(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
float getMinValue() {
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
float getMaxValue() {
|
||||||
|
return 40;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class WaistMeasurementView extends MeasurementView {
|
||||||
|
|
||||||
|
public WaistMeasurementView(Context context) {
|
||||||
|
super(context, context.getResources().getString(R.string.label_waist), ContextCompat.getDrawable(context, R.drawable.waist));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updateValue(ScaleData updateData) {
|
||||||
|
setValueOnView(updateData.waist);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updateDiff(ScaleData updateData, ScaleData lastData) {
|
||||||
|
setDiffOnView(updateData.waist, lastData.waist);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
String getFormat() {
|
||||||
|
return "%.1f cm";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updatePreferences(SharedPreferences preferences) {
|
||||||
|
setVisible(preferences.getBoolean("waistEnable", true));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value) {
|
||||||
|
return evalSheet.evaluateWaist(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
float getMinValue() {
|
||||||
|
return 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
float getMaxValue() {
|
||||||
|
return 200;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class WHtRMeasurementView extends MeasurementView {
|
||||||
|
|
||||||
|
public WHtRMeasurementView(Context context) {
|
||||||
|
super(context, context.getResources().getString(R.string.label_whtr), ContextCompat.getDrawable(context, R.drawable.whtr));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updateValue(ScaleData updateData) {
|
||||||
|
ScaleCalculator updateCalculator = new ScaleCalculator(updateData);
|
||||||
|
setValueOnView(updateCalculator.getWHtR(scaleUser.body_height));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updateDiff(ScaleData updateData, ScaleData lastData) {
|
||||||
|
ScaleCalculator updateCalculator = new ScaleCalculator(updateData);
|
||||||
|
ScaleCalculator lastCalculator = new ScaleCalculator(lastData);
|
||||||
|
setDiffOnView(updateCalculator.getWHtR(scaleUser.body_height), lastCalculator.getWHtR(scaleUser.body_height));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
String getFormat() {
|
||||||
|
return "%.2f";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updatePreferences(SharedPreferences preferences) {
|
||||||
|
setVisible(preferences.getBoolean("waistEnable", true));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value) {
|
||||||
|
return evalSheet.evaluateWHtR(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
float getMinValue() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
float getMaxValue() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class HipMeasurementView extends MeasurementView {
|
||||||
|
|
||||||
|
public HipMeasurementView(Context context) {
|
||||||
|
super(context, context.getResources().getString(R.string.label_hip), ContextCompat.getDrawable(context, R.drawable.hip));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updateValue(ScaleData updateData) {
|
||||||
|
setValueOnView(updateData.hip);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updateDiff(ScaleData updateData, ScaleData lastData) {
|
||||||
|
setDiffOnView(updateData.hip, lastData.hip);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
String getFormat() {
|
||||||
|
return "%.1f cm";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updatePreferences(SharedPreferences preferences) {
|
||||||
|
setVisible(preferences.getBoolean("hipEnable", true));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value) {
|
||||||
|
return evalSheet.evaluateHip(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
float getMinValue() {
|
||||||
|
return 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
float getMaxValue() {
|
||||||
|
return 200;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class WHRMeasurementView extends MeasurementView {
|
||||||
|
|
||||||
|
public WHRMeasurementView(Context context) {
|
||||||
|
super(context, context.getResources().getString(R.string.label_whr), ContextCompat.getDrawable(context, R.drawable.whr));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updateValue(ScaleData updateData) {
|
||||||
|
ScaleCalculator updateCalculator = new ScaleCalculator(updateData);
|
||||||
|
setValueOnView(updateCalculator.getWHR());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updateDiff(ScaleData updateData, ScaleData lastData) {
|
||||||
|
ScaleCalculator updateCalculator = new ScaleCalculator(updateData);
|
||||||
|
ScaleCalculator lastCalculator = new ScaleCalculator(lastData);
|
||||||
|
setDiffOnView(updateCalculator.getWHR(), lastCalculator.getWHR());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
String getFormat() {
|
||||||
|
return "%.2f";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void updatePreferences(SharedPreferences preferences) {
|
||||||
|
setVisible(preferences.getBoolean("hipEnable", true) && preferences.getBoolean("waistEnable", true));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
EvaluationResult evaluateSheet(EvaluationSheet evalSheet, float value) {
|
||||||
|
return evalSheet.evaluateWHR(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
float getMinValue() {
|
||||||
|
return 0.5f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
float getMaxValue() {
|
||||||
|
return 1.5f;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -30,6 +30,7 @@ import android.view.ViewGroup;
|
|||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
|
import android.widget.TableLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
@@ -69,15 +70,9 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
private TextView txtTitleGoal;
|
private TextView txtTitleGoal;
|
||||||
private TextView txtTitleStatistics;
|
private TextView txtTitleStatistics;
|
||||||
|
|
||||||
private Measurement measurementWeightLast;
|
private TableLayout tableOverviewLayout;
|
||||||
private Measurement measurementBMILast;
|
|
||||||
private Measurement measurementWaterLast;
|
private ArrayList<MeasurementView> overviewMeasurements;
|
||||||
private Measurement measurementMuscleLast;
|
|
||||||
private Measurement measurementFatLast;
|
|
||||||
private Measurement measurementWaistLast;
|
|
||||||
private Measurement measurementWHtRLast;
|
|
||||||
private Measurement measurementHipLast;
|
|
||||||
private Measurement measurementWHRLast;
|
|
||||||
|
|
||||||
private TextView txtGoalWeight;
|
private TextView txtGoalWeight;
|
||||||
private TextView txtGoalDiff;
|
private TextView txtGoalDiff;
|
||||||
@@ -128,15 +123,23 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
txtTitleGoal = (TextView) overviewView.findViewById(R.id.txtTitleGoal);
|
txtTitleGoal = (TextView) overviewView.findViewById(R.id.txtTitleGoal);
|
||||||
txtTitleStatistics = (TextView) overviewView.findViewById(R.id.txtTitleStatistics);
|
txtTitleStatistics = (TextView) overviewView.findViewById(R.id.txtTitleStatistics);
|
||||||
|
|
||||||
measurementWeightLast = new WeightMeasurement(overviewView);
|
tableOverviewLayout = (TableLayout)overviewView.findViewById(R.id.tableLayoutMeasurements);
|
||||||
measurementBMILast = new BMIMeasurement(overviewView);
|
|
||||||
measurementWaterLast = new WaterMeasurement(overviewView);
|
overviewMeasurements = new ArrayList<>();
|
||||||
measurementMuscleLast = new MuscleMeasurement(overviewView);
|
|
||||||
measurementFatLast = new FatMeasurement(overviewView);
|
overviewMeasurements.add(new WeightMeasurementView(context));
|
||||||
measurementWaistLast = new WaistMeasurement(overviewView);
|
overviewMeasurements.add(new BMIMeasurementView(context));
|
||||||
measurementWHtRLast = new WHtRMeasurement(overviewView);
|
overviewMeasurements.add(new WaterMeasurementView(context));
|
||||||
measurementHipLast = new HipMeasurement(overviewView);
|
overviewMeasurements.add(new MuscleMeasurementView(context));
|
||||||
measurementWHRLast = new WHRMeasurement(overviewView);
|
overviewMeasurements.add(new FatMeasurementView(context));
|
||||||
|
overviewMeasurements.add(new WaistMeasurementView(context));
|
||||||
|
overviewMeasurements.add(new WHtRMeasurementView(context));
|
||||||
|
overviewMeasurements.add(new HipMeasurementView(context));
|
||||||
|
overviewMeasurements.add(new WHRMeasurementView(context));
|
||||||
|
|
||||||
|
for (MeasurementView measuremt : overviewMeasurements) {
|
||||||
|
tableOverviewLayout.addView(measuremt);
|
||||||
|
}
|
||||||
|
|
||||||
txtGoalWeight = (TextView) overviewView.findViewById(R.id.txtGoalWeight);
|
txtGoalWeight = (TextView) overviewView.findViewById(R.id.txtGoalWeight);
|
||||||
txtGoalDiff = (TextView) overviewView.findViewById(R.id.txtGoalDiff);
|
txtGoalDiff = (TextView) overviewView.findViewById(R.id.txtGoalDiff);
|
||||||
@@ -194,7 +197,7 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
lastScaleData = userSelectedData;
|
lastScaleData = userSelectedData;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
lastScaleData = scaleDataList.get(0);
|
lastScaleData = scaleDataList.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -206,12 +209,15 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
txtTitleStatistics.setText(getResources().getString(R.string.label_title_statistics).toUpperCase());
|
txtTitleStatistics.setText(getResources().getString(R.string.label_title_statistics).toUpperCase());
|
||||||
|
|
||||||
updateUserSelection();
|
updateUserSelection();
|
||||||
updateVisibleRows();
|
|
||||||
updateLastPieChart();
|
updateLastPieChart();
|
||||||
updateLastLineChart(scaleDataList);
|
updateLastLineChart(scaleDataList);
|
||||||
updateLastValues();
|
|
||||||
updateGoal(scaleDataList);
|
updateGoal(scaleDataList);
|
||||||
updateStatistics(scaleDataList);
|
updateStatistics(scaleDataList);
|
||||||
|
|
||||||
|
for (MeasurementView measuremt : overviewMeasurements) {
|
||||||
|
measuremt.updatePreferences(prefs);
|
||||||
|
measuremt.updateValue(lastScaleData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateUserSelection() {
|
private void updateUserSelection() {
|
||||||
@@ -220,15 +226,9 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
|
|
||||||
userSelectedData = null;
|
userSelectedData = null;
|
||||||
|
|
||||||
measurementWeightLast.scaleUser = currentScaleUser;
|
for (MeasurementView measuremt : overviewMeasurements) {
|
||||||
measurementBMILast.scaleUser = currentScaleUser;
|
measuremt.updateScaleUser(currentScaleUser);
|
||||||
measurementWaterLast.scaleUser = currentScaleUser;
|
}
|
||||||
measurementMuscleLast.scaleUser = currentScaleUser;
|
|
||||||
measurementFatLast.scaleUser = currentScaleUser;
|
|
||||||
measurementWaistLast.scaleUser = currentScaleUser;
|
|
||||||
measurementWHtRLast.scaleUser = currentScaleUser;
|
|
||||||
measurementHipLast.scaleUser = currentScaleUser;
|
|
||||||
measurementWHRLast.scaleUser = currentScaleUser;
|
|
||||||
|
|
||||||
spinUserAdapter.clear();
|
spinUserAdapter.clear();
|
||||||
ArrayList<ScaleUser> scaleUserList = OpenScale.getInstance(overviewView.getContext()).getScaleUserList();
|
ArrayList<ScaleUser> scaleUserList = OpenScale.getInstance(overviewView.getContext()).getScaleUserList();
|
||||||
@@ -249,34 +249,6 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
spinUser.setSelection(posUser, true);
|
spinUser.setSelection(posUser, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateVisibleRows() {
|
|
||||||
measurementWeightLast.updateVisibleRow(prefs);
|
|
||||||
measurementBMILast.updateVisibleRow(prefs);
|
|
||||||
measurementWaterLast.updateVisibleRow(prefs);
|
|
||||||
measurementMuscleLast.updateVisibleRow(prefs);
|
|
||||||
measurementHipLast.updateVisibleRow(prefs);
|
|
||||||
measurementFatLast.updateVisibleRow(prefs);
|
|
||||||
measurementWaistLast.updateVisibleRow(prefs);
|
|
||||||
measurementWHRLast.updateVisibleRow(prefs);
|
|
||||||
measurementWHtRLast.updateVisibleRow(prefs);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateLastValues() {
|
|
||||||
ScaleCalculator calculator = new ScaleCalculator();
|
|
||||||
calculator.body_height = currentScaleUser.body_height;
|
|
||||||
calculator.setScaleData(lastScaleData);
|
|
||||||
|
|
||||||
measurementWeightLast.updateValue(lastScaleData.weight);
|
|
||||||
measurementBMILast.updateValue(calculator.getBMI());
|
|
||||||
measurementFatLast.updateValue(lastScaleData.fat);
|
|
||||||
measurementWaterLast.updateValue(lastScaleData.water);
|
|
||||||
measurementMuscleLast.updateValue(lastScaleData.muscle);
|
|
||||||
measurementWaistLast.updateValue(lastScaleData.waist);
|
|
||||||
measurementWHtRLast.updateValue(calculator.getWHtR());
|
|
||||||
measurementHipLast.updateValue(lastScaleData.hip);
|
|
||||||
measurementWHRLast.updateValue(calculator.getWHR());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateGoal(ArrayList<ScaleData> scaleDataList) {
|
private void updateGoal(ArrayList<ScaleData> scaleDataList) {
|
||||||
txtGoalWeight.setText(currentScaleUser.goal_weight + " " + ScaleUser.UNIT_STRING[currentScaleUser.scale_unit]);
|
txtGoalWeight.setText(currentScaleUser.goal_weight + " " + ScaleUser.UNIT_STRING[currentScaleUser.scale_unit]);
|
||||||
|
|
||||||
@@ -290,19 +262,17 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
long days = daysBetween(curDate, goalDate);
|
long days = daysBetween(curDate, goalDate);
|
||||||
txtGoalDayLeft.setText(days + " " + getResources().getString(R.string.label_days));
|
txtGoalDayLeft.setText(days + " " + getResources().getString(R.string.label_days));
|
||||||
|
|
||||||
ScaleCalculator currentCalculator = new ScaleCalculator();
|
ScaleCalculator currentCalculator = new ScaleCalculator(lastScaleData);
|
||||||
currentCalculator.body_height = currentScaleUser.body_height;
|
|
||||||
currentCalculator.weight = lastScaleData.weight;
|
|
||||||
|
|
||||||
ScaleCalculator goalCalculator = new ScaleCalculator();
|
ScaleData goalData = new ScaleData();
|
||||||
goalCalculator.body_height = currentScaleUser.body_height;
|
goalData.weight = currentScaleUser.goal_weight;
|
||||||
goalCalculator.weight = currentScaleUser.goal_weight;
|
ScaleCalculator goalCalculator = new ScaleCalculator(goalData);
|
||||||
|
|
||||||
txtLabelGoalWeight.setText(
|
txtLabelGoalWeight.setText(
|
||||||
Html.fromHtml(
|
Html.fromHtml(
|
||||||
getResources().getString(R.string.label_goal_weight) +
|
getResources().getString(R.string.label_goal_weight) +
|
||||||
" <br> <font color='grey'><small>BMI " +
|
" <br> <font color='grey'><small>BMI " +
|
||||||
String.format("%.1f", goalCalculator.getBMI()) +
|
String.format("%.1f", goalCalculator.getBMI(currentScaleUser.body_height)) +
|
||||||
" </small></font>"
|
" </small></font>"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -310,7 +280,7 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
Html.fromHtml(
|
Html.fromHtml(
|
||||||
getResources().getString(R.string.label_weight_difference) +
|
getResources().getString(R.string.label_weight_difference) +
|
||||||
" <br> <font color='grey'><small>BMI " +
|
" <br> <font color='grey'><small>BMI " +
|
||||||
String.format("%.1f", currentCalculator.getBMI() - goalCalculator.getBMI()) +
|
String.format("%.1f", currentCalculator.getBMI(currentScaleUser.body_height) - goalCalculator.getBMI(currentScaleUser.body_height)) +
|
||||||
" </small></font>"
|
" </small></font>"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -334,23 +304,9 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
if (scaleDataIterator.hasNext()) {
|
if (scaleDataIterator.hasNext()) {
|
||||||
ScaleData diffScaleData = scaleDataIterator.next();
|
ScaleData diffScaleData = scaleDataIterator.next();
|
||||||
|
|
||||||
ScaleCalculator lastScaleCalculator = new ScaleCalculator();
|
for (MeasurementView measuremt : overviewMeasurements) {
|
||||||
lastScaleCalculator.body_height = currentScaleUser.body_height;
|
measuremt.updateDiff(lastScaleData, diffScaleData);
|
||||||
lastScaleCalculator.setScaleData(lastScaleData);
|
}
|
||||||
|
|
||||||
ScaleCalculator diffScaleCalculator = new ScaleCalculator();
|
|
||||||
diffScaleCalculator.body_height = currentScaleUser.body_height;
|
|
||||||
diffScaleCalculator.setScaleData(diffScaleData);
|
|
||||||
|
|
||||||
measurementWeightLast.setDiff(lastScaleData.weight, diffScaleData.weight);
|
|
||||||
measurementBMILast.setDiff(lastScaleCalculator.getBMI(), diffScaleCalculator.getBMI());
|
|
||||||
measurementMuscleLast.setDiff(lastScaleData.muscle, diffScaleData.muscle);
|
|
||||||
measurementFatLast.setDiff(lastScaleData.fat, diffScaleData.fat);
|
|
||||||
measurementWaterLast.setDiff(lastScaleData.water, diffScaleData.water);
|
|
||||||
measurementWaistLast.setDiff(lastScaleData.waist, diffScaleData.waist);
|
|
||||||
measurementWHtRLast.setDiff(lastScaleCalculator.getWHtR(), diffScaleCalculator.getWHtR());
|
|
||||||
measurementHipLast.setDiff(lastScaleData.hip, diffScaleData.hip);
|
|
||||||
measurementWHRLast.setDiff(lastScaleCalculator.getWHR(), diffScaleCalculator.getWHR());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -395,21 +351,19 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
{
|
{
|
||||||
histDate.setTime(scaleData.date_time);
|
histDate.setTime(scaleData.date_time);
|
||||||
|
|
||||||
ScaleCalculator calculator = new ScaleCalculator();
|
ScaleCalculator calculator = new ScaleCalculator(scaleData);
|
||||||
calculator.body_height = currentScaleUser.body_height;
|
|
||||||
calculator.setScaleData(scaleData);
|
|
||||||
|
|
||||||
if (weekPastDate.before(histDate)) {
|
if (weekPastDate.before(histDate)) {
|
||||||
weekSize++;
|
weekSize++;
|
||||||
|
|
||||||
weekAvgWeight += scaleData.weight;
|
weekAvgWeight += scaleData.weight;
|
||||||
weekAvgBMI += calculator.getBMI();
|
weekAvgBMI += calculator.getBMI(currentScaleUser.body_height);
|
||||||
weekAvgFat += scaleData.fat;
|
weekAvgFat += scaleData.fat;
|
||||||
weekAvgWater += scaleData.water;
|
weekAvgWater += scaleData.water;
|
||||||
weekAvgMuscle += scaleData.muscle;
|
weekAvgMuscle += scaleData.muscle;
|
||||||
weekAvgWaist += scaleData.waist;
|
weekAvgWaist += scaleData.waist;
|
||||||
weekAvgHip += scaleData.hip;
|
weekAvgHip += scaleData.hip;
|
||||||
weekAvgWHtR += calculator.getWHtR();
|
weekAvgWHtR += calculator.getWHtR(currentScaleUser.body_height);
|
||||||
weekAvgWHR += calculator.getWHR();
|
weekAvgWHR += calculator.getWHR();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -417,13 +371,13 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
monthSize++;
|
monthSize++;
|
||||||
|
|
||||||
monthAvgWeight += scaleData.weight;
|
monthAvgWeight += scaleData.weight;
|
||||||
monthAvgBMI += calculator.getBMI();
|
monthAvgBMI += calculator.getBMI(currentScaleUser.body_height);
|
||||||
monthAvgFat += scaleData.fat;
|
monthAvgFat += scaleData.fat;
|
||||||
monthAvgWater += scaleData.water;
|
monthAvgWater += scaleData.water;
|
||||||
monthAvgMuscle += scaleData.muscle;
|
monthAvgMuscle += scaleData.muscle;
|
||||||
monthAvgWaist += scaleData.waist;
|
monthAvgWaist += scaleData.waist;
|
||||||
monthAvgHip += scaleData.hip;
|
monthAvgHip += scaleData.hip;
|
||||||
monthAvgWHtR += calculator.getWHtR();
|
monthAvgWHtR += calculator.getWHtR(currentScaleUser.body_height);
|
||||||
monthAvgWHR += calculator.getWHR();
|
monthAvgWHR += calculator.getWHR();
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
|
@@ -1,35 +0,0 @@
|
|||||||
package com.health.openscale.gui;
|
|
||||||
|
|
||||||
import android.text.Html;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
public class ScaleDiff {
|
|
||||||
private static String SYMBOL_UP = "↗";
|
|
||||||
private static String SYMBOL_DOWN = "↘";
|
|
||||||
|
|
||||||
public static void setDiff(TextView txtLabel,
|
|
||||||
double diff,
|
|
||||||
String labelResource,
|
|
||||||
String format) {
|
|
||||||
|
|
||||||
String symbol;
|
|
||||||
|
|
||||||
if (diff > 0.0) {
|
|
||||||
symbol = SYMBOL_UP;
|
|
||||||
} else {
|
|
||||||
symbol = SYMBOL_DOWN;
|
|
||||||
}
|
|
||||||
|
|
||||||
txtLabel.setText(
|
|
||||||
Html.fromHtml(
|
|
||||||
labelResource +
|
|
||||||
" <br> <font color='grey'>" +
|
|
||||||
symbol +
|
|
||||||
"<small> " +
|
|
||||||
String.format(format, diff) +
|
|
||||||
"</small></font>"
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@@ -90,642 +90,6 @@
|
|||||||
android:layout_weight="90"
|
android:layout_weight="90"
|
||||||
android:stretchColumns="1"
|
android:stretchColumns="1"
|
||||||
android:id="@+id/tableLayoutMeasurements">
|
android:id="@+id/tableLayoutMeasurements">
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:id="@+id/tableRowWeight">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:id="@+id/imageView11"
|
|
||||||
android:src="@drawable/weight"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="@string/label_weight"
|
|
||||||
android:id="@+id/txtLabelWeight"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:password="false"
|
|
||||||
android:phoneNumber="false"
|
|
||||||
android:lines="2"
|
|
||||||
android:layout_marginRight="50dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="-1kg"
|
|
||||||
android:id="@+id/txtWeightLast"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginRight="20dp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="10dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:id="@+id/indicatorWeight" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:id="@+id/tableRowGaugeWeight"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_marginBottom="10dp">
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<com.health.openscale.gui.LinearGaugeView
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/linearGaugeWeight" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:id="@+id/tableRowBMI">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:id="@+id/imageView"
|
|
||||||
android:src="@drawable/bmi"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="@string/label_bmi"
|
|
||||||
android:id="@+id/txtLabelBMI"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:password="false"
|
|
||||||
android:phoneNumber="false"
|
|
||||||
android:lines="2"
|
|
||||||
android:layout_marginRight="50dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="-1"
|
|
||||||
android:id="@+id/txtBMILast"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginRight="20dp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="10dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:id="@+id/indicatorBMI" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:id="@+id/tableRowGaugeBMI"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<com.health.openscale.gui.LinearGaugeView
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/linearGaugeBMI" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:id="@+id/tableRowFat"
|
|
||||||
android:layout_marginBottom="10dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:id="@+id/imageView2"
|
|
||||||
android:src="@drawable/fat"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="@string/label_fat"
|
|
||||||
android:id="@+id/txtLabelFat"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:password="false"
|
|
||||||
android:phoneNumber="false"
|
|
||||||
android:lines="2"
|
|
||||||
android:layout_marginRight="50dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="-1 %"
|
|
||||||
android:id="@+id/txtFatLast"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:layout_gravity="center_vertical" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="10dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:id="@+id/indicatorFat" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:id="@+id/tableRowGaugeFat"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<com.health.openscale.gui.LinearGaugeView
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/linearGaugeFat" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:id="@+id/tableRowMuscle"
|
|
||||||
android:layout_marginBottom="10dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:id="@+id/imageView3"
|
|
||||||
android:src="@drawable/muscle"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="@string/label_muscle"
|
|
||||||
android:id="@+id/txtLabelMuscle"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:password="false"
|
|
||||||
android:phoneNumber="false"
|
|
||||||
android:lines="2"
|
|
||||||
android:layout_marginRight="50dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="-1 %"
|
|
||||||
android:id="@+id/txtMuscleLast"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginRight="20dp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="10dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:id="@+id/indicatorMuscle" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:id="@+id/tableRowGaugeMuscle"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<com.health.openscale.gui.LinearGaugeView
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/linearGaugeMuscle" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:id="@+id/tableRowWater"
|
|
||||||
android:layout_marginBottom="10dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:id="@+id/imageView4"
|
|
||||||
android:src="@drawable/water"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="@string/label_water"
|
|
||||||
android:id="@+id/txtLabelWater"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:password="false"
|
|
||||||
android:phoneNumber="false"
|
|
||||||
android:lines="2"
|
|
||||||
android:layout_marginRight="50dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="-1 %"
|
|
||||||
android:id="@+id/txtWaterLast"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginRight="20dp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="10dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:id="@+id/indicatorWater" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:id="@+id/tableRowGaugeWater"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<com.health.openscale.gui.LinearGaugeView
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/linearGaugeWater" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:id="@+id/tableRowWaist"
|
|
||||||
android:layout_marginBottom="10dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:id="@+id/imageView45"
|
|
||||||
android:src="@drawable/waist"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="@string/label_waist"
|
|
||||||
android:id="@+id/txtLabelWaist"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:password="false"
|
|
||||||
android:phoneNumber="false"
|
|
||||||
android:lines="2"
|
|
||||||
android:layout_marginRight="50dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="-1 %"
|
|
||||||
android:id="@+id/txtWaistLast"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginRight="20dp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="10dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:id="@+id/indicatorWaist" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:id="@+id/tableRowGaugeWaist"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<com.health.openscale.gui.LinearGaugeView
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/linearGaugeWaist" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:id="@+id/tableRowWHtR"
|
|
||||||
android:layout_marginBottom="10dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:id="@+id/imageView456"
|
|
||||||
android:src="@drawable/whtr"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="@string/label_whtr"
|
|
||||||
android:id="@+id/txtLabelWHtR"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:password="false"
|
|
||||||
android:phoneNumber="false"
|
|
||||||
android:lines="2"
|
|
||||||
android:layout_marginRight="50dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="-1"
|
|
||||||
android:id="@+id/txtWHtRLast"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginRight="20dp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="10dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:id="@+id/indicatorWHtR" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:id="@+id/tableRowGaugeWHtR"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<com.health.openscale.gui.LinearGaugeView
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/linearGaugeWHtR" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:id="@+id/tableRowHip"
|
|
||||||
android:layout_marginBottom="10dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:id="@+id/imageView16"
|
|
||||||
android:src="@drawable/hip"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="@string/label_hip"
|
|
||||||
android:id="@+id/txtLabelHip"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:password="false"
|
|
||||||
android:phoneNumber="false"
|
|
||||||
android:lines="2"
|
|
||||||
android:layout_marginRight="50dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="-1 %"
|
|
||||||
android:id="@+id/txtHipLast"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginRight="20dp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="10dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:id="@+id/indicatorHip" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:id="@+id/tableRowGaugeHip"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<com.health.openscale.gui.LinearGaugeView
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/linearGaugeHip" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:id="@+id/tableRowWHR"
|
|
||||||
android:layout_marginBottom="10dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:id="@+id/imageView49"
|
|
||||||
android:src="@drawable/whr"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="@string/label_whr"
|
|
||||||
android:id="@+id/txtLabelWHR"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:password="false"
|
|
||||||
android:phoneNumber="false"
|
|
||||||
android:lines="2"
|
|
||||||
android:layout_marginRight="50dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="-1"
|
|
||||||
android:id="@+id/txtWHRLast"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginRight="20dp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="10dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:id="@+id/indicatorWHR" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:id="@+id/tableRowGaugeWHR"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<com.health.openscale.gui.LinearGaugeView
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/linearGaugeWHR" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
</TableLayout>
|
</TableLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@@ -81,665 +81,6 @@
|
|||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:stretchColumns="1"
|
android:stretchColumns="1"
|
||||||
android:id="@+id/tableLayoutMeasurements">
|
android:id="@+id/tableLayoutMeasurements">
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:weightSum="100"
|
|
||||||
android:id="@+id/tableRowWeight">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="25dp"
|
|
||||||
android:id="@+id/imageView11"
|
|
||||||
android:src="@drawable/weight"
|
|
||||||
android:layout_gravity="center"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="80"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="@string/label_weight"
|
|
||||||
android:id="@+id/txtLabelWeight"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:password="false"
|
|
||||||
android:phoneNumber="false"
|
|
||||||
android:lines="2"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:layout_weight="20"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="-1kg"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:id="@+id/txtWeightLast"
|
|
||||||
android:layout_gravity="center_vertical"/>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="2dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:id="@+id/indicatorWeight" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:id="@+id/tableRowGaugeWeight"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_marginBottom="10dp">
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<com.health.openscale.gui.LinearGaugeView
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/linearGaugeWeight" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:weightSum="100"
|
|
||||||
android:id="@+id/tableRowBMI">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="25dp"
|
|
||||||
android:id="@+id/imageView"
|
|
||||||
android:src="@drawable/bmi"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="80"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="@string/label_bmi"
|
|
||||||
android:id="@+id/txtLabelBMI"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:password="false"
|
|
||||||
android:phoneNumber="false"
|
|
||||||
android:lines="2" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="20"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="-1"
|
|
||||||
android:id="@+id/txtBMILast"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:layout_gravity="center_vertical" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="2dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:id="@+id/indicatorBMI" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:weightSum="100"
|
|
||||||
android:id="@+id/tableRowGaugeBMI"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<com.health.openscale.gui.LinearGaugeView
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/linearGaugeBMI" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:id="@+id/tableRowFat"
|
|
||||||
android:weightSum="100"
|
|
||||||
android:layout_marginBottom="10dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="25dp"
|
|
||||||
android:id="@+id/imageView2"
|
|
||||||
android:src="@drawable/fat"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="80"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="@string/label_fat"
|
|
||||||
android:id="@+id/txtLabelFat"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:password="false"
|
|
||||||
android:phoneNumber="false"
|
|
||||||
android:lines="2"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="20"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="-1 %"
|
|
||||||
android:id="@+id/txtFatLast"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:layout_gravity="center_vertical" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="2dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:id="@+id/indicatorFat" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:id="@+id/tableRowGaugeFat"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<com.health.openscale.gui.LinearGaugeView
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/linearGaugeFat" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:id="@+id/tableRowMuscle"
|
|
||||||
android:weightSum="100"
|
|
||||||
android:layout_marginBottom="10dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="25dp"
|
|
||||||
android:id="@+id/imageView3"
|
|
||||||
android:src="@drawable/muscle"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="80"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="@string/label_muscle"
|
|
||||||
android:id="@+id/txtLabelMuscle"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:password="false"
|
|
||||||
android:phoneNumber="false"
|
|
||||||
android:lines="2" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="20"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="-1 %"
|
|
||||||
android:id="@+id/txtMuscleLast"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:layout_gravity="center_vertical" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="2dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:id="@+id/indicatorMuscle" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:id="@+id/tableRowGaugeMuscle"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<com.health.openscale.gui.LinearGaugeView
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/linearGaugeMuscle" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:id="@+id/tableRowWater"
|
|
||||||
android:layout_marginBottom="10dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="25dp"
|
|
||||||
android:id="@+id/imageView4"
|
|
||||||
android:src="@drawable/water"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="80"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="@string/label_water"
|
|
||||||
android:id="@+id/txtLabelWater"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:password="false"
|
|
||||||
android:phoneNumber="false"
|
|
||||||
android:lines="2"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="20"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="-1 %"
|
|
||||||
android:id="@+id/txtWaterLast"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:layout_gravity="center_vertical" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="2dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:id="@+id/indicatorWater" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:id="@+id/tableRowGaugeWater"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<com.health.openscale.gui.LinearGaugeView
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/linearGaugeWater" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:id="@+id/tableRowWaist"
|
|
||||||
android:layout_marginBottom="10dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="25dp"
|
|
||||||
android:id="@+id/imageView45"
|
|
||||||
android:src="@drawable/waist"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="80"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="@string/label_waist"
|
|
||||||
android:id="@+id/txtLabelWaist"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:password="false"
|
|
||||||
android:phoneNumber="false"
|
|
||||||
android:lines="2" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="20"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="-1 %"
|
|
||||||
android:id="@+id/txtWaistLast"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:layout_gravity="center_vertical" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="2dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:id="@+id/indicatorWaist" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:id="@+id/tableRowGaugeWaist"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<com.health.openscale.gui.LinearGaugeView
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/linearGaugeWaist" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:id="@+id/tableRowWHtR"
|
|
||||||
android:layout_marginBottom="10dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="25dp"
|
|
||||||
android:id="@+id/imageView456"
|
|
||||||
android:src="@drawable/whtr"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="80"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="@string/label_whtr"
|
|
||||||
android:id="@+id/txtLabelWHtR"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:password="false"
|
|
||||||
android:phoneNumber="false"
|
|
||||||
android:lines="2" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="20"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="-1"
|
|
||||||
android:id="@+id/txtWHtRLast"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:layout_gravity="center_vertical" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="2dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:id="@+id/indicatorWHtR" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:id="@+id/tableRowGaugeWHtR"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<com.health.openscale.gui.LinearGaugeView
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/linearGaugeWHtR" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:id="@+id/tableRowHip"
|
|
||||||
android:layout_marginBottom="10dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="25dp"
|
|
||||||
android:id="@+id/imageView16"
|
|
||||||
android:src="@drawable/hip"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="80"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="@string/label_hip"
|
|
||||||
android:id="@+id/txtLabelHip"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:password="false"
|
|
||||||
android:phoneNumber="false"
|
|
||||||
android:lines="2" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="20"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="-1 %"
|
|
||||||
android:id="@+id/txtHipLast"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:layout_gravity="center_vertical"/>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="10dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:id="@+id/indicatorHip" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:id="@+id/tableRowGaugeHip"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<com.health.openscale.gui.LinearGaugeView
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/linearGaugeHip" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:id="@+id/tableRowWHR"
|
|
||||||
android:layout_marginBottom="10dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="25dp"
|
|
||||||
android:id="@+id/imageView49"
|
|
||||||
android:src="@drawable/whr"
|
|
||||||
android:layout_gravity="center" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="80"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="@string/label_whr"
|
|
||||||
android:id="@+id/txtLabelWHR"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:password="false"
|
|
||||||
android:phoneNumber="false"
|
|
||||||
android:lines="2" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="20"
|
|
||||||
android:textSize="15dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:text="-1"
|
|
||||||
android:id="@+id/txtWHRLast"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:layout_gravity="center_vertical" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="2dp"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:id="@+id/indicatorWHR" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:id="@+id/tableRowGaugeWHR"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<com.health.openscale.gui.LinearGaugeView
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/linearGaugeWHR" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="20px"
|
|
||||||
android:layout_height="20px" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
</TableLayout>
|
</TableLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
Reference in New Issue
Block a user