mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-24 01:03:20 +02:00
add hip circumference and waist circumference
This commit is contained in:
@@ -149,7 +149,7 @@ public class OpenScale {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addScaleData(int user_id, String date_time, float weight, float fat,
|
public void addScaleData(int user_id, String date_time, float weight, float fat,
|
||||||
float water, float muscle, String comment) {
|
float water, float muscle, float waist, float hip, String comment) {
|
||||||
ScaleData scaleData = new ScaleData();
|
ScaleData scaleData = new ScaleData();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -159,6 +159,8 @@ public class OpenScale {
|
|||||||
scaleData.fat = fat;
|
scaleData.fat = fat;
|
||||||
scaleData.water = water;
|
scaleData.water = water;
|
||||||
scaleData.muscle = muscle;
|
scaleData.muscle = muscle;
|
||||||
|
scaleData.waist = waist;
|
||||||
|
scaleData.hip = hip;
|
||||||
scaleData.comment = comment;
|
scaleData.comment = comment;
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
Log.e("OpenScale", "Can't parse date time string while adding to the database");
|
Log.e("OpenScale", "Can't parse date time string while adding to the database");
|
||||||
@@ -169,7 +171,7 @@ public class OpenScale {
|
|||||||
updateScaleData();
|
updateScaleData();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateScaleData(long id, String date_time, float weight, float fat, float water, float muscle, String comment) {
|
public void updateScaleData(long id, String date_time, float weight, float fat, float water, float muscle, float waist, float hip, String comment) {
|
||||||
ScaleData scaleData = new ScaleData();
|
ScaleData scaleData = new ScaleData();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -178,6 +180,8 @@ public class OpenScale {
|
|||||||
scaleData.fat = fat;
|
scaleData.fat = fat;
|
||||||
scaleData.water = water;
|
scaleData.water = water;
|
||||||
scaleData.muscle = muscle;
|
scaleData.muscle = muscle;
|
||||||
|
scaleData.waist = waist;
|
||||||
|
scaleData.hip = hip;
|
||||||
scaleData.comment = comment;
|
scaleData.comment = comment;
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
Log.e("OpenScale", "Can't parse date time string while adding to the database");
|
Log.e("OpenScale", "Can't parse date time string while adding to the database");
|
||||||
@@ -216,7 +220,9 @@ public class OpenScale {
|
|||||||
newScaleData.fat = Float.parseFloat(csvField[2]);
|
newScaleData.fat = Float.parseFloat(csvField[2]);
|
||||||
newScaleData.water = Float.parseFloat(csvField[3]);
|
newScaleData.water = Float.parseFloat(csvField[3]);
|
||||||
newScaleData.muscle = Float.parseFloat(csvField[4]);
|
newScaleData.muscle = Float.parseFloat(csvField[4]);
|
||||||
newScaleData.comment = csvField[5];
|
newScaleData.waist = Float.parseFloat(csvField[5]);
|
||||||
|
newScaleData.hip = Float.parseFloat(csvField[6]);
|
||||||
|
newScaleData.comment = csvField[7];
|
||||||
|
|
||||||
newScaleData.user_id = getSelectedScaleUser().id;
|
newScaleData.user_id = getSelectedScaleUser().id;
|
||||||
|
|
||||||
@@ -249,6 +255,8 @@ public class OpenScale {
|
|||||||
csvWriter.append(Float.toString(scaleData.fat) + ",");
|
csvWriter.append(Float.toString(scaleData.fat) + ",");
|
||||||
csvWriter.append(Float.toString(scaleData.water) + ",");
|
csvWriter.append(Float.toString(scaleData.water) + ",");
|
||||||
csvWriter.append(Float.toString(scaleData.muscle) + ",");
|
csvWriter.append(Float.toString(scaleData.muscle) + ",");
|
||||||
|
csvWriter.append(Float.toString(scaleData.waist) + ",");
|
||||||
|
csvWriter.append(Float.toString(scaleData.hip) + ",");
|
||||||
if (!scaleData.comment.isEmpty()) {
|
if (!scaleData.comment.isEmpty()) {
|
||||||
csvWriter.append(scaleData.comment);
|
csvWriter.append(scaleData.comment);
|
||||||
}
|
}
|
||||||
|
@@ -26,6 +26,8 @@ public class ScaleData {
|
|||||||
public float fat;
|
public float fat;
|
||||||
public float water;
|
public float water;
|
||||||
public float muscle;
|
public float muscle;
|
||||||
|
public float waist;
|
||||||
|
public float hip;
|
||||||
public String comment;
|
public String comment;
|
||||||
|
|
||||||
public ScaleData()
|
public ScaleData()
|
||||||
@@ -36,13 +38,15 @@ public class ScaleData {
|
|||||||
weight = -1.0f;
|
weight = -1.0f;
|
||||||
fat = -1.0f;
|
fat = -1.0f;
|
||||||
water = -1.0f;
|
water = -1.0f;
|
||||||
muscle = 1.0f;
|
muscle = -1.0f;
|
||||||
|
waist = -1.0f;
|
||||||
|
hip = -1.0f;
|
||||||
comment = new String();
|
comment = new String();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return "ID : " + id + " USER_ID: " + user_id + " DATE_TIME: " + date_time.toString() + " WEIGHT: " + weight + " FAT: " + fat + " WATER: " + water + " MUSCLE: " + muscle + " COMMENT: " + comment;
|
return "ID : " + id + " USER_ID: " + user_id + " DATE_TIME: " + date_time.toString() + " WEIGHT: " + weight + " FAT: " + fat + " WATER: " + water + " MUSCLE: " + muscle + " WAIST: " + waist + " HIP: " + hip + " COMMENT: " + comment;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -31,7 +31,7 @@ import java.util.Calendar;
|
|||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
public class ScaleDatabase extends SQLiteOpenHelper {
|
public class ScaleDatabase extends SQLiteOpenHelper {
|
||||||
private static final int DATABASE_VERSION = 2;
|
private static final int DATABASE_VERSION = 3;
|
||||||
private static final String DATABASE_NAME = "openScaleDatabase.db";
|
private static final String DATABASE_NAME = "openScaleDatabase.db";
|
||||||
|
|
||||||
private static final String TABLE_NAME = "scaledata";
|
private static final String TABLE_NAME = "scaledata";
|
||||||
@@ -42,6 +42,8 @@ public class ScaleDatabase extends SQLiteOpenHelper {
|
|||||||
private static final String COLUMN_NAME_FAT = "fat";
|
private static final String COLUMN_NAME_FAT = "fat";
|
||||||
private static final String COLUMN_NAME_WATER = "water";
|
private static final String COLUMN_NAME_WATER = "water";
|
||||||
private static final String COLUMN_NAME_MUSCLE = "muscle";
|
private static final String COLUMN_NAME_MUSCLE = "muscle";
|
||||||
|
private static final String COLUMN_NAME_WAIST = "waist";
|
||||||
|
private static final String COLUMN_NAME_HIP = "hip";
|
||||||
private static final String COLUMN_NAME_COMMENT = "comment";
|
private static final String COLUMN_NAME_COMMENT = "comment";
|
||||||
|
|
||||||
private static final String SQL_CREATE_ENTRIES =
|
private static final String SQL_CREATE_ENTRIES =
|
||||||
@@ -53,6 +55,8 @@ public class ScaleDatabase extends SQLiteOpenHelper {
|
|||||||
COLUMN_NAME_FAT + " REAL," +
|
COLUMN_NAME_FAT + " REAL," +
|
||||||
COLUMN_NAME_WATER + " REAL," +
|
COLUMN_NAME_WATER + " REAL," +
|
||||||
COLUMN_NAME_MUSCLE + " REAL," +
|
COLUMN_NAME_MUSCLE + " REAL," +
|
||||||
|
COLUMN_NAME_WAIST + " REAL," +
|
||||||
|
COLUMN_NAME_HIP + " REAL," +
|
||||||
COLUMN_NAME_COMMENT + " TEXT" +
|
COLUMN_NAME_COMMENT + " TEXT" +
|
||||||
")";
|
")";
|
||||||
|
|
||||||
@@ -68,6 +72,8 @@ public class ScaleDatabase extends SQLiteOpenHelper {
|
|||||||
COLUMN_NAME_FAT,
|
COLUMN_NAME_FAT,
|
||||||
COLUMN_NAME_WATER,
|
COLUMN_NAME_WATER,
|
||||||
COLUMN_NAME_MUSCLE,
|
COLUMN_NAME_MUSCLE,
|
||||||
|
COLUMN_NAME_WAIST,
|
||||||
|
COLUMN_NAME_HIP,
|
||||||
COLUMN_NAME_COMMENT
|
COLUMN_NAME_COMMENT
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -87,6 +93,11 @@ public class ScaleDatabase extends SQLiteOpenHelper {
|
|||||||
if (oldVersion == 1 && newVersion == 2) {
|
if (oldVersion == 1 && newVersion == 2) {
|
||||||
db.execSQL("ALTER TABLE " + TABLE_NAME + " ADD COLUMN " + COLUMN_NAME_COMMENT + " TEXT DEFAULT ''");
|
db.execSQL("ALTER TABLE " + TABLE_NAME + " ADD COLUMN " + COLUMN_NAME_COMMENT + " TEXT DEFAULT ''");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (oldVersion == 2 && newVersion == 3) {
|
||||||
|
db.execSQL("ALTER TABLE " + TABLE_NAME + " ADD COLUMN " + COLUMN_NAME_WAIST + " REAL DEFAULT 0");
|
||||||
|
db.execSQL("ALTER TABLE " + TABLE_NAME + " ADD COLUMN " + COLUMN_NAME_HIP + " REAL DEFAULT 0");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clearScaleData(int userId) {
|
public void clearScaleData(int userId) {
|
||||||
@@ -112,6 +123,8 @@ public class ScaleDatabase extends SQLiteOpenHelper {
|
|||||||
values.put(COLUMN_NAME_FAT, scaleData.fat);
|
values.put(COLUMN_NAME_FAT, scaleData.fat);
|
||||||
values.put(COLUMN_NAME_WATER, scaleData.water);
|
values.put(COLUMN_NAME_WATER, scaleData.water);
|
||||||
values.put(COLUMN_NAME_MUSCLE, scaleData.muscle);
|
values.put(COLUMN_NAME_MUSCLE, scaleData.muscle);
|
||||||
|
values.put(COLUMN_NAME_WAIST, scaleData.waist);
|
||||||
|
values.put(COLUMN_NAME_HIP, scaleData.hip);
|
||||||
values.put(COLUMN_NAME_COMMENT, scaleData.comment);
|
values.put(COLUMN_NAME_COMMENT, scaleData.comment);
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -137,6 +150,8 @@ public class ScaleDatabase extends SQLiteOpenHelper {
|
|||||||
values.put(COLUMN_NAME_FAT, scaleData.fat);
|
values.put(COLUMN_NAME_FAT, scaleData.fat);
|
||||||
values.put(COLUMN_NAME_WATER, scaleData.water);
|
values.put(COLUMN_NAME_WATER, scaleData.water);
|
||||||
values.put(COLUMN_NAME_MUSCLE, scaleData.muscle);
|
values.put(COLUMN_NAME_MUSCLE, scaleData.muscle);
|
||||||
|
values.put(COLUMN_NAME_WAIST, scaleData.waist);
|
||||||
|
values.put(COLUMN_NAME_HIP, scaleData.hip);
|
||||||
values.put(COLUMN_NAME_COMMENT, scaleData.comment);
|
values.put(COLUMN_NAME_COMMENT, scaleData.comment);
|
||||||
|
|
||||||
db.update(TABLE_NAME, values, COLUMN_NAME_ID + "=" + id, null);
|
db.update(TABLE_NAME, values, COLUMN_NAME_ID + "=" + id, null);
|
||||||
@@ -271,6 +286,8 @@ public class ScaleDatabase extends SQLiteOpenHelper {
|
|||||||
scaleData.fat = cur.getFloat(cur.getColumnIndexOrThrow(COLUMN_NAME_FAT));
|
scaleData.fat = cur.getFloat(cur.getColumnIndexOrThrow(COLUMN_NAME_FAT));
|
||||||
scaleData.water = cur.getFloat(cur.getColumnIndexOrThrow(COLUMN_NAME_WATER));
|
scaleData.water = cur.getFloat(cur.getColumnIndexOrThrow(COLUMN_NAME_WATER));
|
||||||
scaleData.muscle = cur.getFloat(cur.getColumnIndexOrThrow(COLUMN_NAME_MUSCLE));
|
scaleData.muscle = cur.getFloat(cur.getColumnIndexOrThrow(COLUMN_NAME_MUSCLE));
|
||||||
|
scaleData.waist = cur.getFloat(cur.getColumnIndexOrThrow(COLUMN_NAME_WAIST));
|
||||||
|
scaleData.hip = cur.getFloat(cur.getColumnIndexOrThrow(COLUMN_NAME_HIP));
|
||||||
scaleData.comment = cur.getString(cur.getColumnIndexOrThrow(COLUMN_NAME_COMMENT));
|
scaleData.comment = cur.getString(cur.getColumnIndexOrThrow(COLUMN_NAME_COMMENT));
|
||||||
|
|
||||||
scaleData.date_time = formatDateTime.parse(date_time);
|
scaleData.date_time = formatDateTime.parse(date_time);
|
||||||
|
@@ -54,6 +54,8 @@ public class DataEntryActivity extends Activity {
|
|||||||
private EditText txtFat;
|
private EditText txtFat;
|
||||||
private EditText txtWater;
|
private EditText txtWater;
|
||||||
private EditText txtMuscle;
|
private EditText txtMuscle;
|
||||||
|
private EditText txtWaist;
|
||||||
|
private EditText txtHip;
|
||||||
private EditText txtDate;
|
private EditText txtDate;
|
||||||
private EditText txtTime;
|
private EditText txtTime;
|
||||||
private EditText txtComment;
|
private EditText txtComment;
|
||||||
@@ -88,6 +90,8 @@ public class DataEntryActivity extends Activity {
|
|||||||
txtFat = (EditText) findViewById(R.id.txtFat);
|
txtFat = (EditText) findViewById(R.id.txtFat);
|
||||||
txtWater = (EditText) findViewById(R.id.txtWater);
|
txtWater = (EditText) findViewById(R.id.txtWater);
|
||||||
txtMuscle = (EditText) findViewById(R.id.txtMuscle);
|
txtMuscle = (EditText) findViewById(R.id.txtMuscle);
|
||||||
|
txtWaist = (EditText) findViewById(R.id.txtWaist);
|
||||||
|
txtHip = (EditText) findViewById(R.id.txtHip);
|
||||||
txtDate = (EditText) findViewById(R.id.txtDate);
|
txtDate = (EditText) findViewById(R.id.txtDate);
|
||||||
txtTime = (EditText) findViewById(R.id.txtTime);
|
txtTime = (EditText) findViewById(R.id.txtTime);
|
||||||
txtComment = (EditText) findViewById(R.id.txtComment);
|
txtComment = (EditText) findViewById(R.id.txtComment);
|
||||||
@@ -131,6 +135,16 @@ public class DataEntryActivity extends Activity {
|
|||||||
row.setVisibility(View.GONE);
|
row.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!prefs.getBoolean("waistEnable", true)) {
|
||||||
|
TableRow row = (TableRow)findViewById(R.id.tableRowWaist);
|
||||||
|
row.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!prefs.getBoolean("hipEnable", true)) {
|
||||||
|
TableRow row = (TableRow)findViewById(R.id.tableRowHip);
|
||||||
|
row.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
if (getIntent().getExtras().getInt("mode") == EDIT_DATA_REQUEST) {
|
if (getIntent().getExtras().getInt("mode") == EDIT_DATA_REQUEST) {
|
||||||
editMode();
|
editMode();
|
||||||
}
|
}
|
||||||
@@ -160,6 +174,8 @@ public class DataEntryActivity extends Activity {
|
|||||||
txtFat.setText(editScaleData.fat+"");
|
txtFat.setText(editScaleData.fat+"");
|
||||||
txtWater.setText(editScaleData.water+"");
|
txtWater.setText(editScaleData.water+"");
|
||||||
txtMuscle.setText(editScaleData.muscle+"");
|
txtMuscle.setText(editScaleData.muscle+"");
|
||||||
|
txtWaist.setText(editScaleData.waist+"");
|
||||||
|
txtHip.setText(editScaleData.hip+"");
|
||||||
txtComment.setText(editScaleData.comment);
|
txtComment.setText(editScaleData.comment);
|
||||||
|
|
||||||
txtDate.setText(dateFormat.format(editScaleData.date_time));
|
txtDate.setText(dateFormat.format(editScaleData.date_time));
|
||||||
@@ -182,10 +198,14 @@ public class DataEntryActivity extends Activity {
|
|||||||
txtFat.setText(Float.toString(lastScaleData.fat));
|
txtFat.setText(Float.toString(lastScaleData.fat));
|
||||||
txtWater.setText(Float.toString(lastScaleData.water));
|
txtWater.setText(Float.toString(lastScaleData.water));
|
||||||
txtMuscle.setText(Float.toString(lastScaleData.muscle));
|
txtMuscle.setText(Float.toString(lastScaleData.muscle));
|
||||||
|
txtWaist.setText(Float.toString(lastScaleData.waist));
|
||||||
|
txtHip.setText(Float.toString(lastScaleData.hip));
|
||||||
} else {
|
} else {
|
||||||
txtFat.setText(Float.toString(0.0f));
|
txtFat.setText(Float.toString(0.0f));
|
||||||
txtWater.setText(Float.toString(0.0f));
|
txtWater.setText(Float.toString(0.0f));
|
||||||
txtMuscle.setText(Float.toString(0.0f));
|
txtMuscle.setText(Float.toString(0.0f));
|
||||||
|
txtWaist.setText(Float.toString(0.0f));
|
||||||
|
txtHip.setText(Float.toString(0.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
txtDate.setText(dateFormat.format(new Date()));
|
txtDate.setText(dateFormat.format(new Date()));
|
||||||
@@ -200,7 +220,7 @@ public class DataEntryActivity extends Activity {
|
|||||||
{
|
{
|
||||||
txtWeight.setError(getResources().getString(R.string.error_weight_value_required));
|
txtWeight.setError(getResources().getString(R.string.error_weight_value_required));
|
||||||
validate = false;
|
validate = false;
|
||||||
} else if( !(Float.valueOf(txtWeight.getText().toString()) >= 0 && Float.valueOf(txtWeight.getText().toString()) <= 300) )
|
} else if(!isInRange(txtWeight.getText().toString(), 300))
|
||||||
{
|
{
|
||||||
txtWeight.setError(getResources().getString(R.string.error_value_range_0_300));
|
txtWeight.setError(getResources().getString(R.string.error_value_range_0_300));
|
||||||
validate = false;
|
validate = false;
|
||||||
@@ -210,7 +230,7 @@ public class DataEntryActivity extends Activity {
|
|||||||
{
|
{
|
||||||
txtFat.setError(getResources().getString(R.string.error_fat_value_required));
|
txtFat.setError(getResources().getString(R.string.error_fat_value_required));
|
||||||
validate = false;
|
validate = false;
|
||||||
} else if(!isInRange(txtFat.getText().toString()))
|
} else if(!isInRange(txtFat.getText().toString(), 100))
|
||||||
{
|
{
|
||||||
txtFat.setError(getResources().getString(R.string.error_value_range_0_100));
|
txtFat.setError(getResources().getString(R.string.error_value_range_0_100));
|
||||||
validate = false;
|
validate = false;
|
||||||
@@ -221,7 +241,7 @@ public class DataEntryActivity extends Activity {
|
|||||||
{
|
{
|
||||||
txtWater.setError(getResources().getString(R.string.error_water_value_required));
|
txtWater.setError(getResources().getString(R.string.error_water_value_required));
|
||||||
validate = false;
|
validate = false;
|
||||||
} else if(!isInRange(txtWater.getText().toString()))
|
} else if(!isInRange(txtWater.getText().toString(), 100))
|
||||||
{
|
{
|
||||||
txtWater.setError(getResources().getString(R.string.error_value_range_0_100));
|
txtWater.setError(getResources().getString(R.string.error_value_range_0_100));
|
||||||
validate = false;
|
validate = false;
|
||||||
@@ -231,23 +251,43 @@ public class DataEntryActivity extends Activity {
|
|||||||
{
|
{
|
||||||
txtMuscle.setError(getResources().getString(R.string.error_muscle_value_required));
|
txtMuscle.setError(getResources().getString(R.string.error_muscle_value_required));
|
||||||
validate = false;
|
validate = false;
|
||||||
} else if(!isInRange(txtMuscle.getText().toString()))
|
} else if(!isInRange(txtMuscle.getText().toString(), 100))
|
||||||
{
|
{
|
||||||
txtMuscle.setError(getResources().getString(R.string.error_value_range_0_100));
|
txtMuscle.setError(getResources().getString(R.string.error_value_range_0_100));
|
||||||
validate = false;
|
validate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( txtWaist.getText().toString().length() == 0 )
|
||||||
|
{
|
||||||
|
txtWaist.setError(getResources().getString(R.string.error_waist_value_required));
|
||||||
|
validate = false;
|
||||||
|
} else if(!isInRange(txtWaist.getText().toString(), 300))
|
||||||
|
{
|
||||||
|
txtWaist.setError(getResources().getString(R.string.error_value_range_0_300));
|
||||||
|
validate = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( txtHip.getText().toString().length() == 0 )
|
||||||
|
{
|
||||||
|
txtHip.setError(getResources().getString(R.string.error_hip_value_required));
|
||||||
|
validate = false;
|
||||||
|
} else if(!isInRange(txtHip.getText().toString(), 300))
|
||||||
|
{
|
||||||
|
txtHip.setError(getResources().getString(R.string.error_value_range_0_300));
|
||||||
|
validate = false;
|
||||||
|
}
|
||||||
|
|
||||||
return validate;
|
return validate;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isInRange(String value)
|
private boolean isInRange(String value, int maxValue)
|
||||||
{
|
{
|
||||||
if (value.length() == 0)
|
if (value.length() == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
float val = Float.valueOf(value);
|
float val = Float.valueOf(value);
|
||||||
|
|
||||||
if (val >= 0 && val <= 100)
|
if (val >= 0 && val <= maxValue)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -259,6 +299,9 @@ public class DataEntryActivity extends Activity {
|
|||||||
float fat = Float.valueOf(txtFat.getText().toString());
|
float fat = Float.valueOf(txtFat.getText().toString());
|
||||||
float water = Float.valueOf(txtWater.getText().toString());
|
float water = Float.valueOf(txtWater.getText().toString());
|
||||||
float muscle = Float.valueOf(txtMuscle.getText().toString());
|
float muscle = Float.valueOf(txtMuscle.getText().toString());
|
||||||
|
float waist = Float.valueOf(txtWaist.getText().toString());
|
||||||
|
float hip = Float.valueOf(txtHip.getText().toString());
|
||||||
|
|
||||||
String comment = txtComment.getText().toString();
|
String comment = txtComment.getText().toString();
|
||||||
|
|
||||||
String date = txtDate.getText().toString();
|
String date = txtDate.getText().toString();
|
||||||
@@ -266,7 +309,7 @@ public class DataEntryActivity extends Activity {
|
|||||||
|
|
||||||
OpenScale openScale = OpenScale.getInstance(context);
|
OpenScale openScale = OpenScale.getInstance(context);
|
||||||
|
|
||||||
openScale.updateScaleData(id, date + " " + time, weight, fat, water, muscle, comment);
|
openScale.updateScaleData(id, date + " " + time, weight, fat, water, muscle, waist, hip, comment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -360,12 +403,14 @@ public class DataEntryActivity extends Activity {
|
|||||||
float fat = Float.valueOf(txtFat.getText().toString());
|
float fat = Float.valueOf(txtFat.getText().toString());
|
||||||
float water = Float.valueOf(txtWater.getText().toString());
|
float water = Float.valueOf(txtWater.getText().toString());
|
||||||
float muscle = Float.valueOf(txtMuscle.getText().toString());
|
float muscle = Float.valueOf(txtMuscle.getText().toString());
|
||||||
|
float waist = Float.valueOf(txtWaist.getText().toString());
|
||||||
|
float hip = Float.valueOf(txtHip.getText().toString());
|
||||||
String comment = txtComment.getText().toString();
|
String comment = txtComment.getText().toString();
|
||||||
|
|
||||||
String date = txtDate.getText().toString();
|
String date = txtDate.getText().toString();
|
||||||
String time = txtTime.getText().toString();
|
String time = txtTime.getText().toString();
|
||||||
|
|
||||||
openScale.addScaleData(selectedUserId, date + " " + time, weight, fat, water, muscle, comment);
|
openScale.addScaleData(selectedUserId, date + " " + time, weight, fat, water, muscle, waist, hip, comment);
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
@@ -376,10 +421,12 @@ public class DataEntryActivity extends Activity {
|
|||||||
private class onClickListenerOk implements View.OnClickListener {
|
private class onClickListenerOk implements View.OnClickListener {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
if (validateInput()) {
|
||||||
saveScaleData();
|
saveScaleData();
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private class onClickListenerLeft implements View.OnClickListener {
|
private class onClickListenerLeft implements View.OnClickListener {
|
||||||
@Override
|
@Override
|
||||||
|
@@ -142,6 +142,8 @@ public class GraphFragment extends Fragment implements FragmentUpdateListener {
|
|||||||
List<PointValue> valuesFat = new ArrayList<PointValue>();
|
List<PointValue> valuesFat = new ArrayList<PointValue>();
|
||||||
List<PointValue> valuesWater = new ArrayList<PointValue>();
|
List<PointValue> valuesWater = new ArrayList<PointValue>();
|
||||||
List<PointValue> valuesMuscle = new ArrayList<PointValue>();
|
List<PointValue> valuesMuscle = new ArrayList<PointValue>();
|
||||||
|
List<PointValue> valuesWaist = new ArrayList<PointValue>();
|
||||||
|
List<PointValue> valuesHip = new ArrayList<PointValue>();
|
||||||
List<Line> lines = new ArrayList<Line>();
|
List<Line> lines = new ArrayList<Line>();
|
||||||
|
|
||||||
Calendar calDB = Calendar.getInstance();
|
Calendar calDB = Calendar.getInstance();
|
||||||
@@ -154,6 +156,9 @@ public class GraphFragment extends Fragment implements FragmentUpdateListener {
|
|||||||
valuesFat.add(new PointValue(calDB.get(Calendar.DAY_OF_MONTH)-1, scaleEntry.fat));
|
valuesFat.add(new PointValue(calDB.get(Calendar.DAY_OF_MONTH)-1, scaleEntry.fat));
|
||||||
valuesWater.add(new PointValue(calDB.get(Calendar.DAY_OF_MONTH)-1, scaleEntry.water));
|
valuesWater.add(new PointValue(calDB.get(Calendar.DAY_OF_MONTH)-1, scaleEntry.water));
|
||||||
valuesMuscle.add(new PointValue(calDB.get(Calendar.DAY_OF_MONTH)-1, scaleEntry.muscle));
|
valuesMuscle.add(new PointValue(calDB.get(Calendar.DAY_OF_MONTH)-1, scaleEntry.muscle));
|
||||||
|
valuesWaist.add(new PointValue(calDB.get(Calendar.DAY_OF_MONTH)-1, scaleEntry.waist));
|
||||||
|
valuesHip.add(new PointValue(calDB.get(Calendar.DAY_OF_MONTH)-1, scaleEntry.hip));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -173,6 +178,14 @@ public class GraphFragment extends Fragment implements FragmentUpdateListener {
|
|||||||
setColor(ChartUtils.COLOR_GREEN).
|
setColor(ChartUtils.COLOR_GREEN).
|
||||||
setHasLabels(prefs.getBoolean("labelsEnable", true)).
|
setHasLabels(prefs.getBoolean("labelsEnable", true)).
|
||||||
setFormatter(new SimpleLineChartValueFormatter(1));
|
setFormatter(new SimpleLineChartValueFormatter(1));
|
||||||
|
Line lineWaist = new Line(valuesWaist).
|
||||||
|
setColor(Color.MAGENTA).
|
||||||
|
setHasLabels(prefs.getBoolean("labelsEnable", true)).
|
||||||
|
setFormatter(new SimpleLineChartValueFormatter(1));
|
||||||
|
Line lineHip = new Line(valuesHip).
|
||||||
|
setColor(Color.YELLOW).
|
||||||
|
setHasLabels(prefs.getBoolean("labelsEnable", true)).
|
||||||
|
setFormatter(new SimpleLineChartValueFormatter(1));
|
||||||
|
|
||||||
|
|
||||||
if(prefs.getBoolean("weightEnable", true)) {
|
if(prefs.getBoolean("weightEnable", true)) {
|
||||||
@@ -191,6 +204,14 @@ public class GraphFragment extends Fragment implements FragmentUpdateListener {
|
|||||||
lines.add(lineMuscle);
|
lines.add(lineMuscle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(prefs.getBoolean("waistEnable", true)) {
|
||||||
|
lines.add(lineWaist);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(prefs.getBoolean("hipEnable", true)) {
|
||||||
|
lines.add(lineHip);
|
||||||
|
}
|
||||||
|
|
||||||
LineChartData lineData = new LineChartData(lines);
|
LineChartData lineData = new LineChartData(lines);
|
||||||
lineData.setAxisXBottom(new Axis(axisValues).
|
lineData.setAxisXBottom(new Axis(axisValues).
|
||||||
setHasLines(true).
|
setHasLines(true).
|
||||||
|
@@ -74,6 +74,8 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
private TextView txtWaterLast;
|
private TextView txtWaterLast;
|
||||||
private TextView txtMuscleLast;
|
private TextView txtMuscleLast;
|
||||||
private TextView txtFatLast;
|
private TextView txtFatLast;
|
||||||
|
private TextView txtWaistLast;
|
||||||
|
private TextView txtHipLast;
|
||||||
|
|
||||||
private TextView txtGoalWeight;
|
private TextView txtGoalWeight;
|
||||||
private TextView txtGoalDiff;
|
private TextView txtGoalDiff;
|
||||||
@@ -87,6 +89,8 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
private TextView txtLabelFat;
|
private TextView txtLabelFat;
|
||||||
private TextView txtLabelMuscle;
|
private TextView txtLabelMuscle;
|
||||||
private TextView txtLabelWater;
|
private TextView txtLabelWater;
|
||||||
|
private TextView txtLabelWaist;
|
||||||
|
private TextView txtLabelHip;
|
||||||
|
|
||||||
private TextView txtLabelGoalWeight;
|
private TextView txtLabelGoalWeight;
|
||||||
private TextView txtLabelGoalDiff;
|
private TextView txtLabelGoalDiff;
|
||||||
@@ -129,6 +133,8 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
txtWaterLast = (TextView) overviewView.findViewById(R.id.txtWaterLast);
|
txtWaterLast = (TextView) overviewView.findViewById(R.id.txtWaterLast);
|
||||||
txtMuscleLast = (TextView) overviewView.findViewById(R.id.txtMuscleLast);
|
txtMuscleLast = (TextView) overviewView.findViewById(R.id.txtMuscleLast);
|
||||||
txtFatLast = (TextView) overviewView.findViewById(R.id.txtFatLast);
|
txtFatLast = (TextView) overviewView.findViewById(R.id.txtFatLast);
|
||||||
|
txtWaistLast = (TextView) overviewView.findViewById(R.id.txtWaistLast);
|
||||||
|
txtHipLast = (TextView) overviewView.findViewById(R.id.txtHipLast);
|
||||||
|
|
||||||
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);
|
||||||
@@ -142,6 +148,9 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
txtLabelFat = (TextView) overviewView.findViewById(R.id.txtLabelFat);
|
txtLabelFat = (TextView) overviewView.findViewById(R.id.txtLabelFat);
|
||||||
txtLabelMuscle = (TextView) overviewView.findViewById(R.id.txtLabelMuscle);
|
txtLabelMuscle = (TextView) overviewView.findViewById(R.id.txtLabelMuscle);
|
||||||
txtLabelWater = (TextView) overviewView.findViewById(R.id.txtLabelWater);
|
txtLabelWater = (TextView) overviewView.findViewById(R.id.txtLabelWater);
|
||||||
|
txtLabelWaist = (TextView) overviewView.findViewById(R.id.txtLabelWaist);
|
||||||
|
txtLabelHip = (TextView) overviewView.findViewById(R.id.txtLabelHip);
|
||||||
|
|
||||||
|
|
||||||
txtLabelGoalWeight = (TextView) overviewView.findViewById(R.id.txtLabelGoalWeight);
|
txtLabelGoalWeight = (TextView) overviewView.findViewById(R.id.txtLabelGoalWeight);
|
||||||
txtLabelGoalDiff = (TextView) overviewView.findViewById(R.id.txtLabelGoalDiff);
|
txtLabelGoalDiff = (TextView) overviewView.findViewById(R.id.txtLabelGoalDiff);
|
||||||
@@ -186,6 +195,16 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
row.setVisibility(View.GONE);
|
row.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!prefs.getBoolean("waistEnable", true)) {
|
||||||
|
TableRow row = (TableRow)overviewView.findViewById(R.id.tableRowWaist);
|
||||||
|
row.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!prefs.getBoolean("hipEnable", true)) {
|
||||||
|
TableRow row = (TableRow)overviewView.findViewById(R.id.tableRowHip);
|
||||||
|
row.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
spinUser.setOnItemSelectedListener(new spinUserSelectionListener());
|
spinUser.setOnItemSelectedListener(new spinUserSelectionListener());
|
||||||
|
|
||||||
ArrayList<String> userItems = new ArrayList<>();
|
ArrayList<String> userItems = new ArrayList<>();
|
||||||
@@ -241,6 +260,8 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
txtFatLast.setText(lastScaleData.fat + " %");
|
txtFatLast.setText(lastScaleData.fat + " %");
|
||||||
txtWaterLast.setText(lastScaleData.water + " %");
|
txtWaterLast.setText(lastScaleData.water + " %");
|
||||||
txtMuscleLast.setText(lastScaleData.muscle + " %");
|
txtMuscleLast.setText(lastScaleData.muscle + " %");
|
||||||
|
txtWaistLast.setText(lastScaleData.waist + " cm");
|
||||||
|
txtHipLast.setText(lastScaleData.hip + " cm");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateGoal(ArrayList<ScaleData> scaleDataList) {
|
private void updateGoal(ArrayList<ScaleData> scaleDataList) {
|
||||||
@@ -268,6 +289,9 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
double diffFat = lastScaleData.fat - diffScaleData.fat;
|
double diffFat = lastScaleData.fat - diffScaleData.fat;
|
||||||
double diffMuscle = lastScaleData.muscle - diffScaleData.muscle;
|
double diffMuscle = lastScaleData.muscle - diffScaleData.muscle;
|
||||||
double diffWater = lastScaleData.water - diffScaleData.water;
|
double diffWater = lastScaleData.water - diffScaleData.water;
|
||||||
|
double diffWaist = lastScaleData.waist - diffScaleData.waist;
|
||||||
|
double diffHip = lastScaleData.hip - diffScaleData.hip;
|
||||||
|
|
||||||
|
|
||||||
if (diffWeight > 0.0)
|
if (diffWeight > 0.0)
|
||||||
txtLabelWeight.setText(Html.fromHtml(getResources().getString(R.string.label_weight) + " <br> <font color='grey'>↗<small> " + String.format("%.1f ", diffWeight) + ScaleUser.UNIT_STRING[currentScaleUser.scale_unit] + "</small></font>"));
|
txtLabelWeight.setText(Html.fromHtml(getResources().getString(R.string.label_weight) + " <br> <font color='grey'>↗<small> " + String.format("%.1f ", diffWeight) + ScaleUser.UNIT_STRING[currentScaleUser.scale_unit] + "</small></font>"));
|
||||||
@@ -294,6 +318,16 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
txtLabelWater.setText(Html.fromHtml(getResources().getString(R.string.label_water) + " <br> <font color='grey'>↗<small> " + String.format("%.1f", diffWater) + "%</small></font>"));
|
txtLabelWater.setText(Html.fromHtml(getResources().getString(R.string.label_water) + " <br> <font color='grey'>↗<small> " + String.format("%.1f", diffWater) + "%</small></font>"));
|
||||||
else
|
else
|
||||||
txtLabelWater.setText(Html.fromHtml(getResources().getString(R.string.label_water) + " <br> <font color='grey'>↘<small> " + String.format("%.1f", diffWater) + "%</small></font>"));
|
txtLabelWater.setText(Html.fromHtml(getResources().getString(R.string.label_water) + " <br> <font color='grey'>↘<small> " + String.format("%.1f", diffWater) + "%</small></font>"));
|
||||||
|
|
||||||
|
if (diffWaist > 0.0)
|
||||||
|
txtLabelWaist.setText(Html.fromHtml(getResources().getString(R.string.label_waist) + " <br> <font color='grey'>↗<small> " + String.format("%.1f", diffWaist) + "%</small></font>"));
|
||||||
|
else
|
||||||
|
txtLabelWaist.setText(Html.fromHtml(getResources().getString(R.string.label_waist) + " <br> <font color='grey'>↘<small> " + String.format("%.1f", diffWaist) + "%</small></font>"));
|
||||||
|
|
||||||
|
if (diffHip > 0.0)
|
||||||
|
txtLabelHip.setText(Html.fromHtml(getResources().getString(R.string.label_hip) + " <br> <font color='grey'>↗<small> " + String.format("%.1f", diffHip) + "%</small></font>"));
|
||||||
|
else
|
||||||
|
txtLabelHip.setText(Html.fromHtml(getResources().getString(R.string.label_hip) + " <br> <font color='grey'>↘<small> " + String.format("%.1f", diffHip) + "%</small></font>"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -314,6 +348,8 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
float weekAvgFat = 0;
|
float weekAvgFat = 0;
|
||||||
float weekAvgWater = 0;
|
float weekAvgWater = 0;
|
||||||
float weekAvgMuscle = 0;
|
float weekAvgMuscle = 0;
|
||||||
|
float weekAvgWaist = 0;
|
||||||
|
float weekAvgHip = 0;
|
||||||
|
|
||||||
int monthSize = 0;
|
int monthSize = 0;
|
||||||
float monthAvgWeight = 0;
|
float monthAvgWeight = 0;
|
||||||
@@ -321,6 +357,9 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
float monthAvgFat = 0;
|
float monthAvgFat = 0;
|
||||||
float monthAvgWater = 0;
|
float monthAvgWater = 0;
|
||||||
float monthAvgMuscle = 0;
|
float monthAvgMuscle = 0;
|
||||||
|
float monthAvgWaist = 0;
|
||||||
|
float monthAvgHip = 0;
|
||||||
|
|
||||||
|
|
||||||
for (ScaleData scaleData : scaleDataList)
|
for (ScaleData scaleData : scaleDataList)
|
||||||
{
|
{
|
||||||
@@ -334,6 +373,8 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
weekAvgFat += scaleData.fat;
|
weekAvgFat += scaleData.fat;
|
||||||
weekAvgWater += scaleData.water;
|
weekAvgWater += scaleData.water;
|
||||||
weekAvgMuscle += scaleData.muscle;
|
weekAvgMuscle += scaleData.muscle;
|
||||||
|
weekAvgWaist += scaleData.waist;
|
||||||
|
weekAvgHip += scaleData.hip;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (monthPastDate.before(histDate)) {
|
if (monthPastDate.before(histDate)) {
|
||||||
@@ -344,6 +385,8 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
monthAvgFat += scaleData.fat;
|
monthAvgFat += scaleData.fat;
|
||||||
monthAvgWater += scaleData.water;
|
monthAvgWater += scaleData.water;
|
||||||
monthAvgMuscle += scaleData.muscle;
|
monthAvgMuscle += scaleData.muscle;
|
||||||
|
monthAvgWaist += scaleData.waist;
|
||||||
|
monthAvgHip += scaleData.hip;
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -354,15 +397,65 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
weekAvgFat /= weekSize;
|
weekAvgFat /= weekSize;
|
||||||
weekAvgWater /= weekSize;
|
weekAvgWater /= weekSize;
|
||||||
weekAvgMuscle /= weekSize;
|
weekAvgMuscle /= weekSize;
|
||||||
|
weekAvgWaist /= weekSize;
|
||||||
|
weekAvgHip /= weekSize;
|
||||||
|
|
||||||
monthAvgWeight /= monthSize;
|
monthAvgWeight /= monthSize;
|
||||||
monthAvgBMI /= monthSize;
|
monthAvgBMI /= monthSize;
|
||||||
monthAvgFat /= monthSize;
|
monthAvgFat /= monthSize;
|
||||||
monthAvgWater /= monthSize;
|
monthAvgWater /= monthSize;
|
||||||
monthAvgMuscle /= monthSize;
|
monthAvgMuscle /= monthSize;
|
||||||
|
monthAvgWaist /= monthSize;
|
||||||
|
monthAvgHip /= monthSize;
|
||||||
|
|
||||||
txtLabelAvgWeek.setText(Html.fromHtml(getResources().getString(R.string.label_last_week) + " <br> <font color='grey'><small> " + String.format("[Ø-"+getResources().getString(R.string.label_weight)+": %.1f" + ScaleUser.UNIT_STRING[currentScaleUser.scale_unit] + "] [Ø-"+getResources().getString(R.string.label_bmi)+": %.1f] [Ø-"+getResources().getString(R.string.label_fat)+": %.1f%%] [Ø-"+getResources().getString(R.string.label_muscle)+": %.1f%%] [Ø-"+getResources().getString(R.string.label_water)+": %.1f%%]", weekAvgWeight, weekAvgBMI, weekAvgFat, weekAvgMuscle, weekAvgWater) + "</small></font>"));
|
String info_week = new String();
|
||||||
txtLabelAvgMonth.setText(Html.fromHtml(getResources().getString(R.string.label_last_month) + " <br> <font color='grey'><small> " + String.format("[Ø-"+getResources().getString(R.string.label_weight)+": %.1f" + ScaleUser.UNIT_STRING[currentScaleUser.scale_unit] + "] [Ø-"+getResources().getString(R.string.label_bmi)+": %.1f] [Ø-"+getResources().getString(R.string.label_fat)+": %.1f%%] [Ø-"+getResources().getString(R.string.label_muscle)+": %.1f%%] [Ø-"+getResources().getString(R.string.label_water)+": %.1f%%]", monthAvgWeight, monthAvgBMI, monthAvgFat, monthAvgMuscle, monthAvgWater) + "</small></font>"));
|
String info_month = new String();
|
||||||
|
|
||||||
|
int lines = 1;
|
||||||
|
|
||||||
|
info_week += String.format("Ø-"+getResources().getString(R.string.label_weight)+": %.1f" + ScaleUser.UNIT_STRING[currentScaleUser.scale_unit] + "<br>", weekAvgWeight);
|
||||||
|
info_month += String.format("Ø-"+getResources().getString(R.string.label_weight)+": %.1f" + ScaleUser.UNIT_STRING[currentScaleUser.scale_unit] + "<br>", monthAvgWeight);
|
||||||
|
lines++;
|
||||||
|
|
||||||
|
info_week += String.format("Ø-"+getResources().getString(R.string.label_bmi)+": %.1f <br>", weekAvgBMI);
|
||||||
|
info_month += String.format("Ø-"+getResources().getString(R.string.label_bmi)+": %.1f <br>", monthAvgBMI);
|
||||||
|
lines++;
|
||||||
|
|
||||||
|
if(prefs.getBoolean("fatEnable", true)) {
|
||||||
|
info_week += String.format("Ø-"+getResources().getString(R.string.label_fat)+": %.1f%% <br>", weekAvgFat);
|
||||||
|
info_month += String.format("Ø-"+getResources().getString(R.string.label_fat)+": %.1f%% <br>", monthAvgFat);
|
||||||
|
lines++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(prefs.getBoolean("muscleEnable", true)) {
|
||||||
|
info_week += String.format("Ø-"+getResources().getString(R.string.label_muscle)+": %.1f%% <br>", weekAvgWater);
|
||||||
|
info_month += String.format("Ø-"+getResources().getString(R.string.label_muscle)+": %.1f%% <br>", monthAvgWater);
|
||||||
|
lines++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(prefs.getBoolean("waterEnable", true)) {
|
||||||
|
info_week += String.format("Ø-"+getResources().getString(R.string.label_water)+": %.1f%% <br>", weekAvgMuscle);
|
||||||
|
info_month += String.format("Ø-"+getResources().getString(R.string.label_water)+": %.1f%% <br>", monthAvgMuscle);
|
||||||
|
lines++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(prefs.getBoolean("waistEnable", true)) {
|
||||||
|
info_week += String.format("Ø-"+getResources().getString(R.string.label_waist)+": %.1f%% <br>", weekAvgWaist);
|
||||||
|
info_month += String.format("Ø-"+getResources().getString(R.string.label_waist)+": %.1f%% <br>", monthAvgWaist);
|
||||||
|
lines++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(prefs.getBoolean("hipEnable", true)) {
|
||||||
|
info_week += String.format("Ø-"+getResources().getString(R.string.label_hip)+": %.1f%% <br>", weekAvgHip);
|
||||||
|
info_month += String.format("Ø-"+getResources().getString(R.string.label_hip)+": %.1f%% <br>",monthAvgHip);
|
||||||
|
lines++;
|
||||||
|
}
|
||||||
|
|
||||||
|
txtLabelAvgWeek.setLines(lines);
|
||||||
|
txtLabelAvgMonth.setLines(lines);
|
||||||
|
|
||||||
|
txtLabelAvgWeek.setText(Html.fromHtml(getResources().getString(R.string.label_last_week) + " <br> <font color='grey'><small> " + info_week + "</small></font>"));
|
||||||
|
txtLabelAvgMonth.setText(Html.fromHtml(getResources().getString(R.string.label_last_month) + " <br> <font color='grey'><small> " + info_month + "</small></font>"));
|
||||||
|
|
||||||
txtAvgWeek.setText(weekSize + " " + getResources().getString(R.string.label_measures));
|
txtAvgWeek.setText(weekSize + " " + getResources().getString(R.string.label_measures));
|
||||||
txtAvgMonth.setText(monthSize + " " + getResources().getString(R.string.label_measures));
|
txtAvgMonth.setText(monthSize + " " + getResources().getString(R.string.label_measures));
|
||||||
@@ -375,6 +468,8 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
List<PointValue> valuesFat = new ArrayList<PointValue>();
|
List<PointValue> valuesFat = new ArrayList<PointValue>();
|
||||||
List<PointValue> valuesWater = new ArrayList<PointValue>();
|
List<PointValue> valuesWater = new ArrayList<PointValue>();
|
||||||
List<PointValue> valuesMuscle = new ArrayList<PointValue>();
|
List<PointValue> valuesMuscle = new ArrayList<PointValue>();
|
||||||
|
List<PointValue> valuesWaist = new ArrayList<PointValue>();
|
||||||
|
List<PointValue> valuesHip = new ArrayList<PointValue>();
|
||||||
List<Line> lines = new ArrayList<Line>();
|
List<Line> lines = new ArrayList<Line>();
|
||||||
|
|
||||||
int max_i = 7;
|
int max_i = 7;
|
||||||
@@ -399,6 +494,8 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
valuesFat.add(new PointValue(i, histData.fat));
|
valuesFat.add(new PointValue(i, histData.fat));
|
||||||
valuesWater.add(new PointValue(i, histData.water));
|
valuesWater.add(new PointValue(i, histData.water));
|
||||||
valuesMuscle.add(new PointValue(i, histData.muscle));
|
valuesMuscle.add(new PointValue(i, histData.muscle));
|
||||||
|
valuesWaist.add(new PointValue(i, histData.waist));
|
||||||
|
valuesHip.add(new PointValue(i, histData.hip));
|
||||||
|
|
||||||
histDate.setTime(histData.date_time);
|
histDate.setTime(histData.date_time);
|
||||||
|
|
||||||
@@ -427,6 +524,14 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
setColor(ChartUtils.COLOR_GREEN).
|
setColor(ChartUtils.COLOR_GREEN).
|
||||||
setHasLabels(prefs.getBoolean("labelsEnable", true)).
|
setHasLabels(prefs.getBoolean("labelsEnable", true)).
|
||||||
setFormatter(new SimpleLineChartValueFormatter(1));
|
setFormatter(new SimpleLineChartValueFormatter(1));
|
||||||
|
Line lineWaist = new Line(valuesWaist).
|
||||||
|
setColor(Color.MAGENTA).
|
||||||
|
setHasLabels(prefs.getBoolean("labelsEnable", true)).
|
||||||
|
setFormatter(new SimpleLineChartValueFormatter(1));
|
||||||
|
Line lineHip = new Line(valuesHip).
|
||||||
|
setColor(Color.YELLOW).
|
||||||
|
setHasLabels(prefs.getBoolean("labelsEnable", true)).
|
||||||
|
setFormatter(new SimpleLineChartValueFormatter(1));
|
||||||
|
|
||||||
activeLines = new ArrayList<lines>();
|
activeLines = new ArrayList<lines>();
|
||||||
|
|
||||||
@@ -450,6 +555,14 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
activeLines.add(OverviewFragment.lines.MUSCLE);
|
activeLines.add(OverviewFragment.lines.MUSCLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(prefs.getBoolean("waistEnable", true)) {
|
||||||
|
lines.add(lineWaist);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(prefs.getBoolean("hipEnable", true)) {
|
||||||
|
lines.add(lineHip);
|
||||||
|
}
|
||||||
|
|
||||||
LineChartData lineData = new LineChartData(lines);
|
LineChartData lineData = new LineChartData(lines);
|
||||||
lineData.setAxisXBottom(new Axis(axisValues).
|
lineData.setAxisXBottom(new Axis(axisValues).
|
||||||
setHasLines(true).
|
setHasLines(true).
|
||||||
@@ -462,8 +575,6 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener
|
|||||||
setTextColor(Color.BLACK)
|
setTextColor(Color.BLACK)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
lineChartLast.setLineChartData(lineData);
|
lineChartLast.setLineChartData(lineData);
|
||||||
lineChartLast.setViewportCalculationEnabled(true);
|
lineChartLast.setViewportCalculationEnabled(true);
|
||||||
|
|
||||||
|
@@ -86,6 +86,10 @@ public class TableFragment extends Fragment implements FragmentUpdateListener {
|
|||||||
txtWaterTableHeader.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11);
|
txtWaterTableHeader.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11);
|
||||||
TextView txtMuscleTableHeader = (TextView)tableView.findViewById(R.id.txtMuscleTableHeader);
|
TextView txtMuscleTableHeader = (TextView)tableView.findViewById(R.id.txtMuscleTableHeader);
|
||||||
txtMuscleTableHeader.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11);
|
txtMuscleTableHeader.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11);
|
||||||
|
TextView txtWaistTableHeader = (TextView)tableView.findViewById(R.id.txtWaistTableHeader);
|
||||||
|
txtWaistTableHeader.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11);
|
||||||
|
TextView txtHipTableHeader = (TextView)tableView.findViewById(R.id.txtHipTableHeader);
|
||||||
|
txtHipTableHeader.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11);
|
||||||
TextView txtCommentTableHeader = (TextView)tableView.findViewById(R.id.txtCommentTableHeader);
|
TextView txtCommentTableHeader = (TextView)tableView.findViewById(R.id.txtCommentTableHeader);
|
||||||
txtCommentTableHeader.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11);
|
txtCommentTableHeader.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11);
|
||||||
Button btnDeleteAll = (Button)tableView.findViewById(R.id.btnDeleteAll);
|
Button btnDeleteAll = (Button)tableView.findViewById(R.id.btnDeleteAll);
|
||||||
@@ -109,6 +113,16 @@ public class TableFragment extends Fragment implements FragmentUpdateListener {
|
|||||||
txtWaterTableHeader.setVisibility(View.GONE);
|
txtWaterTableHeader.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!prefs.getBoolean("waistEnable", true)) {
|
||||||
|
TextView txtWaistTableHeader = (TextView)tableView.findViewById(R.id.txtWaistTableHeader);
|
||||||
|
txtWaistTableHeader.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!prefs.getBoolean("hipEnable", true)) {
|
||||||
|
TextView txtHipTableHeader = (TextView)tableView.findViewById(R.id.txtHipTableHeader);
|
||||||
|
txtHipTableHeader.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
return tableView;
|
return tableView;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,7 +141,13 @@ public class TableFragment extends Fragment implements FragmentUpdateListener {
|
|||||||
if(prefs.getBoolean("muscleEnable", true)) {
|
if(prefs.getBoolean("muscleEnable", true)) {
|
||||||
tableDataView.setColumnStretchable(6, true);
|
tableDataView.setColumnStretchable(6, true);
|
||||||
}
|
}
|
||||||
|
if(prefs.getBoolean("waistEnable", true)) {
|
||||||
tableDataView.setColumnStretchable(7, true);
|
tableDataView.setColumnStretchable(7, true);
|
||||||
|
}
|
||||||
|
if(prefs.getBoolean("hipEnable", true)) {
|
||||||
|
tableDataView.setColumnStretchable(8, true);
|
||||||
|
}
|
||||||
|
tableDataView.setColumnStretchable(9, true);
|
||||||
|
|
||||||
TableRow headerRow = (TableRow) tableView.findViewById(R.id.tableHeader);
|
TableRow headerRow = (TableRow) tableView.findViewById(R.id.tableHeader);
|
||||||
tableDataView.removeAllViews();
|
tableDataView.removeAllViews();
|
||||||
@@ -187,6 +207,21 @@ public class TableFragment extends Fragment implements FragmentUpdateListener {
|
|||||||
}
|
}
|
||||||
dataRow.addView(muscleView);
|
dataRow.addView(muscleView);
|
||||||
|
|
||||||
|
TextView waistView = new TextView(tableView.getContext());
|
||||||
|
waistView.setText(Float.toString(scaleData.waist));
|
||||||
|
waistView.setPadding(0, 5, 5, 5);
|
||||||
|
if(!prefs.getBoolean("waistEnable", true)) {
|
||||||
|
waistView.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
dataRow.addView(waistView);
|
||||||
|
|
||||||
|
TextView hipView = new TextView(tableView.getContext());
|
||||||
|
hipView.setText(Float.toString(scaleData.hip));
|
||||||
|
hipView.setPadding(0, 5, 5, 5);
|
||||||
|
if(!prefs.getBoolean("hipEnable", true)) {
|
||||||
|
hipView.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
dataRow.addView(hipView);
|
||||||
|
|
||||||
TextView commentView = new TextView(tableView.getContext());
|
TextView commentView = new TextView(tableView.getContext());
|
||||||
commentView.setText(scaleData.comment);
|
commentView.setText(scaleData.comment);
|
||||||
@@ -216,6 +251,8 @@ public class TableFragment extends Fragment implements FragmentUpdateListener {
|
|||||||
fatView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11);
|
fatView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11);
|
||||||
waterView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11);
|
waterView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11);
|
||||||
muscleView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11);
|
muscleView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11);
|
||||||
|
waistView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11);
|
||||||
|
hipView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11);
|
||||||
commentView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11);
|
commentView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
android_app/app/src/main/res/drawable/hip.png
Normal file
BIN
android_app/app/src/main/res/drawable/hip.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
android_app/app/src/main/res/drawable/waist.png
Normal file
BIN
android_app/app/src/main/res/drawable/waist.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
@@ -193,6 +193,68 @@
|
|||||||
|
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|
||||||
|
<TableRow
|
||||||
|
android:id="@+id/tableRowWaist"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" >
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:id="@+id/imageView10"
|
||||||
|
android:layout_column="0"
|
||||||
|
android:src="@drawable/waist"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginRight="2dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/label_waist"
|
||||||
|
android:layout_column="1" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/txtWaist"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="@string/info_enter_value_cm"
|
||||||
|
android:inputType="numberDecimal|numberSigned"
|
||||||
|
android:layout_column="2" />
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
|
<TableRow
|
||||||
|
android:id="@+id/tableRowHip"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" >
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:id="@+id/imageView12"
|
||||||
|
android:layout_column="0"
|
||||||
|
android:src="@drawable/hip"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginRight="2dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/label_hip"
|
||||||
|
android:layout_column="1" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/txtHip"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="@string/info_enter_value_cm"
|
||||||
|
android:inputType="numberDecimal|numberSigned"
|
||||||
|
android:layout_column="2" />
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
<TableRow
|
<TableRow
|
||||||
android:id="@+id/tableRowComment"
|
android:id="@+id/tableRowComment"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@@ -290,6 +290,86 @@
|
|||||||
android:layout_marginRight="20dp" />
|
android:layout_marginRight="20dp" />
|
||||||
</TableRow>
|
</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="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" />
|
||||||
|
</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="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" />
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
</TableLayout>
|
</TableLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@@ -75,6 +75,20 @@
|
|||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:id="@+id/txtMuscleTableHeader" />
|
android:id="@+id/txtMuscleTableHeader" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/label_waist"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:id="@+id/txtWaistTableHeader" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/label_hip"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:id="@+id/txtHipTableHeader" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@@ -12,6 +12,8 @@
|
|||||||
<string name="error_value_range_0_300">Der Wert muss zwischen 0 und 300 liegen</string>
|
<string name="error_value_range_0_300">Der Wert muss zwischen 0 und 300 liegen</string>
|
||||||
<string name="error_water_value_required">Wassergehalt ist erforderlich</string>
|
<string name="error_water_value_required">Wassergehalt ist erforderlich</string>
|
||||||
<string name="error_weight_value_required">Gewicht ist erforderlich</string>
|
<string name="error_weight_value_required">Gewicht ist erforderlich</string>
|
||||||
|
<string name="error_waist_value_required">Bauchumfang ist erforderlich</string>
|
||||||
|
<string name="error_hip_value_required">Hüftumfang ist erforderlich</string>
|
||||||
<string name="info_bluetooth_not_established">Bluetooth Verbindung konnte nicht hergestellt werden</string>
|
<string name="info_bluetooth_not_established">Bluetooth Verbindung konnte nicht hergestellt werden</string>
|
||||||
<string name="info_data_all_deleted">Alle Datenbank Einträge wurden gelöscht</string>
|
<string name="info_data_all_deleted">Alle Datenbank Einträge wurden gelöscht</string>
|
||||||
<string name="info_data_deleted">Datenbank Eintrag wurde gelöscht</string>
|
<string name="info_data_deleted">Datenbank Eintrag wurde gelöscht</string>
|
||||||
@@ -22,7 +24,7 @@
|
|||||||
<string name="info_enter_comment">Gebe ein optionalen Kommentar ein</string>
|
<string name="info_enter_comment">Gebe ein optionalen Kommentar ein</string>
|
||||||
<string name="info_enter_goal_weight">Gebe dein Gewicht in deiner Einheit an</string>
|
<string name="info_enter_goal_weight">Gebe dein Gewicht in deiner Einheit an</string>
|
||||||
<string name="info_enter_user_name">Gebe dein Namen ein</string>
|
<string name="info_enter_user_name">Gebe dein Namen ein</string>
|
||||||
<string name="info_enter_value_cm">Gebe deine Körpergröße in cm an</string>
|
<string name="info_enter_value_cm">Gebe dein Wert in cm an</string>
|
||||||
<string name="info_enter_value_percent">Gebe dein Wert in % an</string>
|
<string name="info_enter_value_percent">Gebe dein Wert in % an</string>
|
||||||
<string name="info_enter_value_unit">Gebe dein Wert an in</string>
|
<string name="info_enter_value_unit">Gebe dein Wert an in</string>
|
||||||
<string name="info_is_not_visible">ist nicht sichtbar</string>
|
<string name="info_is_not_visible">ist nicht sichtbar</string>
|
||||||
@@ -48,11 +50,7 @@
|
|||||||
<string name="label_delete">Löschen</string>
|
<string name="label_delete">Löschen</string>
|
||||||
<string name="label_delete_all">Alles löschen</string>
|
<string name="label_delete_all">Alles löschen</string>
|
||||||
<string name="label_device_name">Gerätename</string>
|
<string name="label_device_name">Gerätename</string>
|
||||||
<string name="label_enable_fat">Körperfettanteil</string>
|
|
||||||
<string name="label_enable_labels">Notiz auf den Datenpunkten</string>
|
<string name="label_enable_labels">Notiz auf den Datenpunkten</string>
|
||||||
<string name="label_enable_muscle">Muskelanteil</string>
|
|
||||||
<string name="label_enable_water">Wassergehalt</string>
|
|
||||||
<string name="label_enable_weight">Gewicht</string>
|
|
||||||
<string name="label_export">Exportieren</string>
|
<string name="label_export">Exportieren</string>
|
||||||
<string name="label_fat">Körperfettanteil</string>
|
<string name="label_fat">Körperfettanteil</string>
|
||||||
<string name="label_gender">Geschlecht</string>
|
<string name="label_gender">Geschlecht</string>
|
||||||
@@ -91,4 +89,6 @@
|
|||||||
<string name="title_data">Daten</string>
|
<string name="title_data">Daten</string>
|
||||||
<string name="info_is_not_enable">ist ausgeschaltet</string>
|
<string name="info_is_not_enable">ist ausgeschaltet</string>
|
||||||
<string name="info_is_enable">ist eingeschaltet</string>
|
<string name="info_is_enable">ist eingeschaltet</string>
|
||||||
|
<string name="label_waist">Bauchumfang</string>
|
||||||
|
<string name="label_hip">Hüftumfang</string>
|
||||||
</resources>
|
</resources>
|
@@ -41,10 +41,6 @@
|
|||||||
<string name="label_measures">計測</string>
|
<string name="label_measures">計測</string>
|
||||||
<string name="label_title_last_measurement">最終の計測</string>
|
<string name="label_title_last_measurement">最終の計測</string>
|
||||||
<string name="label_goal_date_is">目標期日は</string>
|
<string name="label_goal_date_is">目標期日は</string>
|
||||||
<string name="label_enable_muscle">筋肉率</string>
|
|
||||||
<string name="label_enable_water">体内の水分</string>
|
|
||||||
<string name="label_enable_weight">体重</string>
|
|
||||||
<string name="label_enable_fat">体脂肪</string>
|
|
||||||
<string name="label_delete_all">全てデリート</string>
|
<string name="label_delete_all">全てデリート</string>
|
||||||
<string name="label_bluetooth_enable">Bluetoothの体重計を探索する</string>
|
<string name="label_bluetooth_enable">Bluetoothの体重計を探索する</string>
|
||||||
<string name="label_last_month">過去30日</string>
|
<string name="label_last_month">過去30日</string>
|
||||||
@@ -82,7 +78,7 @@
|
|||||||
<string name="info_enter_user_name">あなたの名前を入力してください</string>
|
<string name="info_enter_user_name">あなたの名前を入力してください</string>
|
||||||
<string name="info_enter_goal_weight">あなたの体重をあなたの単位で入力してください</string>
|
<string name="info_enter_goal_weight">あなたの体重をあなたの単位で入力してください</string>
|
||||||
<string name="info_enter_comment">任意でコメントを入力してください</string>
|
<string name="info_enter_comment">任意でコメントを入力してください</string>
|
||||||
<string name="info_enter_value_cm">あなたの身長をcmで入力してください</string>
|
<string name="info_enter_value_cm">あなたの値をcmで入力してください</string>
|
||||||
<string name="info_enter_value_percent">あなたの値を%で入力してください</string>
|
<string name="info_enter_value_percent">あなたの値を%で入力してください</string>
|
||||||
<string name="info_enter_value_unit">あなたの値を入力してください</string>
|
<string name="info_enter_value_unit">あなたの値を入力してください</string>
|
||||||
<string name="question_really_delete_all">あなたは本当にすべてのレコードを削除しますか</string>
|
<string name="question_really_delete_all">あなたは本当にすべてのレコードを削除しますか</string>
|
||||||
@@ -91,4 +87,8 @@
|
|||||||
<string name="title_data">データ</string>
|
<string name="title_data">データ</string>
|
||||||
<string name="info_is_not_enable">無効にします</string>
|
<string name="info_is_not_enable">無効にします</string>
|
||||||
<string name="info_is_enable">有効にします</string>
|
<string name="info_is_enable">有効にします</string>
|
||||||
|
<string name="error_hip_value_required">腰囲が必要です</string>
|
||||||
|
<string name="error_waist_value_required">胴囲が必要です</string>
|
||||||
|
<string name="label_waist">胴囲</string>
|
||||||
|
<string name="label_hip">腰囲</string>
|
||||||
</resources>
|
</resources>
|
@@ -24,6 +24,8 @@
|
|||||||
<string name="label_fat">Body fat percentage</string>
|
<string name="label_fat">Body fat percentage</string>
|
||||||
<string name="label_water">Water percentage</string>
|
<string name="label_water">Water percentage</string>
|
||||||
<string name="label_muscle">Muscle percentage</string>
|
<string name="label_muscle">Muscle percentage</string>
|
||||||
|
<string name="label_waist">Waist circumference</string>
|
||||||
|
<string name="label_hip">Hip circumference</string>
|
||||||
<string name="label_comment">Comment</string>
|
<string name="label_comment">Comment</string>
|
||||||
|
|
||||||
<string name="label_days">days</string>
|
<string name="label_days">days</string>
|
||||||
@@ -67,12 +69,15 @@
|
|||||||
<string name="error_user_name_required">Error user name is required</string>
|
<string name="error_user_name_required">Error user name is required</string>
|
||||||
<string name="error_body_height_required">Error body height is required</string>
|
<string name="error_body_height_required">Error body height is required</string>
|
||||||
<string name="error_goal_weight_required">Error goal weight is required</string>
|
<string name="error_goal_weight_required">Error goal weight is required</string>
|
||||||
|
<string name="error_waist_value_required">waist circumference is required</string>
|
||||||
|
<string name="error_hip_value_required">hip circumference is required</string>
|
||||||
|
|
||||||
<string name="info_data_deleted">Database entry deleted</string>
|
<string name="info_data_deleted">Database entry deleted</string>
|
||||||
<string name="info_data_all_deleted">All database entries deleted</string>
|
<string name="info_data_all_deleted">All database entries deleted</string>
|
||||||
<string name="info_data_exported">Data exported to</string>
|
<string name="info_data_exported">Data exported to</string>
|
||||||
<string name="info_data_imported">Data imported from</string>
|
<string name="info_data_imported">Data imported from</string>
|
||||||
<string name="info_set_filename">Set filename to</string>
|
<string name="info_set_filename">Set filename to</string>
|
||||||
|
<string name="info_enter_value_cm">Enter value in cm</string>
|
||||||
<string name="info_enter_value_percent">Enter value in %</string>
|
<string name="info_enter_value_percent">Enter value in %</string>
|
||||||
<string name="info_enter_value_unit">Enter value in</string>
|
<string name="info_enter_value_unit">Enter value in</string>
|
||||||
<string name="info_enter_comment">Enter an optional comment</string>
|
<string name="info_enter_comment">Enter an optional comment</string>
|
||||||
@@ -84,7 +89,6 @@
|
|||||||
<string name="info_delete_bluetooth_data">Clear all Bluetooth data</string>
|
<string name="info_delete_bluetooth_data">Clear all Bluetooth data</string>
|
||||||
<string name="info_delete_bluetooth_data_success">Bluetooth data was successful cleared</string>
|
<string name="info_delete_bluetooth_data_success">Bluetooth data was successful cleared</string>
|
||||||
<string name="info_bluetooth_not_established">Bluetooth connection not established</string>
|
<string name="info_bluetooth_not_established">Bluetooth connection not established</string>
|
||||||
<string name="info_enter_value_cm">Enter your height in cm</string>
|
|
||||||
<string name="info_enter_user_name">Enter your name</string>
|
<string name="info_enter_user_name">Enter your name</string>
|
||||||
<string name="info_no_selected_user">No user exist! Please create a new user in the settings</string>
|
<string name="info_no_selected_user">No user exist! Please create a new user in the settings</string>
|
||||||
|
|
||||||
@@ -96,10 +100,6 @@
|
|||||||
<string name="label_device_name">Device Name</string>
|
<string name="label_device_name">Device Name</string>
|
||||||
|
|
||||||
<string name="label_enable_labels">Label on data point</string>
|
<string name="label_enable_labels">Label on data point</string>
|
||||||
<string name="label_enable_weight">Weight </string>
|
|
||||||
<string name="label_enable_fat">Body fat percentage </string>
|
|
||||||
<string name="label_enable_water">Water percentage </string>
|
|
||||||
<string name="label_enable_muscle">Muscle percentage </string>
|
|
||||||
|
|
||||||
<string name="info_your_weight">Your weight was</string>
|
<string name="info_your_weight">Your weight was</string>
|
||||||
<string name="info_your_fat">Your body fat was</string>
|
<string name="info_your_fat">Your body fat was</string>
|
||||||
|
@@ -15,10 +15,12 @@
|
|||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory android:title="@string/title_data">
|
<PreferenceCategory android:title="@string/title_data">
|
||||||
<CheckBoxPreference android:title="@string/label_enable_weight" android:summaryOn="@string/info_is_enable" android:summaryOff="@string/info_is_not_enable" android:key="weightEnable" android:defaultValue="true"/>
|
<CheckBoxPreference android:title="@string/label_weight" android:summaryOn="@string/info_is_enable" android:summaryOff="@string/info_is_not_enable" android:key="weightEnable" android:defaultValue="true"/>
|
||||||
<CheckBoxPreference android:title="@string/label_enable_fat" android:summaryOn="@string/info_is_enable" android:summaryOff="@string/info_is_not_enable" android:key="fatEnable" android:defaultValue="true"/>
|
<CheckBoxPreference android:title="@string/label_fat" android:summaryOn="@string/info_is_enable" android:summaryOff="@string/info_is_not_enable" android:key="fatEnable" android:defaultValue="true"/>
|
||||||
<CheckBoxPreference android:title="@string/label_enable_water" android:summaryOn="@string/info_is_enable" android:summaryOff="@string/info_is_not_enable" android:key="waterEnable" android:defaultValue="true"/>
|
<CheckBoxPreference android:title="@string/label_water" android:summaryOn="@string/info_is_enable" android:summaryOff="@string/info_is_not_enable" android:key="waterEnable" android:defaultValue="true"/>
|
||||||
<CheckBoxPreference android:title="@string/label_enable_muscle" android:summaryOn="@string/info_is_enable" android:summaryOff="@string/info_is_not_enable" android:key="muscleEnable" android:defaultValue="true"/>
|
<CheckBoxPreference android:title="@string/label_muscle" android:summaryOn="@string/info_is_enable" android:summaryOff="@string/info_is_not_enable" android:key="muscleEnable" android:defaultValue="true"/>
|
||||||
|
<CheckBoxPreference android:title="@string/label_waist" android:summaryOn="@string/info_is_enable" android:summaryOff="@string/info_is_not_enable" android:key="waistEnable" android:defaultValue="false"/>
|
||||||
|
<CheckBoxPreference android:title="@string/label_hip" android:summaryOn="@string/info_is_enable" android:summaryOff="@string/info_is_not_enable" android:key="hipEnable" android:defaultValue="false"/>
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
Reference in New Issue
Block a user