1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-26 17:54:50 +02:00

renamed arm to biceps

This commit is contained in:
OliE
2018-05-13 13:07:58 +02:00
parent dbf33d839b
commit a9f79637e0
14 changed files with 26 additions and 24 deletions

View File

@@ -60,7 +60,9 @@ License: http://creativecommons.org/licenses/by/3.0/
* Madebyoliver (https://www.flaticon.com/authors/madebyoliver)
* Those Icons (https://www.flaticon.com/authors/those-icons)
* Smashicons (https://www.flaticon.com/authors/smashicons)
* Swifticons https://www.flaticon.com/authors/swifticons
* Swifticons (https://www.flaticon.com/authors/swifticons)
* Darius Dan (https://www.flaticon.com/authors/darius-dan)
* Pixelmeetup (https://www.flaticon.com/authors/pixelmeetup)
Contributors to openScale are listed on:
https://github.com/oliexdev/openScale/graphs/contributors

View File

@@ -2,11 +2,11 @@
"formatVersion": 1,
"database": {
"version": 3,
"identityHash": "8f43c71c1f13451e75ad315064990c9a",
"identityHash": "dcde328ede1fdeacf08edfb4d8b834ae",
"entities": [
{
"tableName": "scaleMeasurements",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `userId` INTEGER NOT NULL, `enabled` INTEGER NOT NULL, `datetime` INTEGER, `weight` REAL NOT NULL, `fat` REAL NOT NULL, `water` REAL NOT NULL, `muscle` REAL NOT NULL, `lbw` REAL NOT NULL, `waist` REAL NOT NULL, `hip` REAL NOT NULL, `bone` REAL NOT NULL, `chest` REAL NOT NULL, `thigh` REAL NOT NULL, `arm` REAL NOT NULL, `neck` REAL NOT NULL, `comment` TEXT, FOREIGN KEY(`userId`) REFERENCES `scaleUsers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `userId` INTEGER NOT NULL, `enabled` INTEGER NOT NULL, `datetime` INTEGER, `weight` REAL NOT NULL, `fat` REAL NOT NULL, `water` REAL NOT NULL, `muscle` REAL NOT NULL, `lbw` REAL NOT NULL, `waist` REAL NOT NULL, `hip` REAL NOT NULL, `bone` REAL NOT NULL, `chest` REAL NOT NULL, `thigh` REAL NOT NULL, `biceps` REAL NOT NULL, `neck` REAL NOT NULL, `comment` TEXT, FOREIGN KEY(`userId`) REFERENCES `scaleUsers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
@@ -93,8 +93,8 @@
"notNull": true
},
{
"fieldPath": "arm",
"columnName": "arm",
"fieldPath": "biceps",
"columnName": "biceps",
"affinity": "REAL",
"notNull": true
},
@@ -213,7 +213,7 @@
],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"8f43c71c1f13451e75ad315064990c9a\")"
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"dcde328ede1fdeacf08edfb4d8b834ae\")"
]
}
}

View File

@@ -83,7 +83,7 @@ public abstract class AppDatabase extends RoomDatabase {
try {
database.execSQL("ALTER TABLE scaleMeasurements ADD COLUMN chest REAL NOT NULL DEFAULT 0");
database.execSQL("ALTER TABLE scaleMeasurements ADD COLUMN thigh REAL NOT NULL DEFAULT 0");
database.execSQL("ALTER TABLE scaleMeasurements ADD COLUMN arm REAL NOT NULL DEFAULT 0");
database.execSQL("ALTER TABLE scaleMeasurements ADD COLUMN biceps REAL NOT NULL DEFAULT 0");
database.execSQL("ALTER TABLE scaleMeasurements ADD COLUMN neck REAL NOT NULL DEFAULT 0");
database.setTransactionSuccessful();

View File

@@ -80,8 +80,8 @@ public class ScaleMeasurement implements Cloneable {
@ColumnInfo(name = "thigh")
private float thigh;
@CsvColumn
@ColumnInfo(name = "arm")
private float arm;
@ColumnInfo(name = "biceps")
private float biceps;
@CsvColumn
@ColumnInfo(name = "neck")
private float neck;
@@ -104,7 +104,7 @@ public class ScaleMeasurement implements Cloneable {
hip = 0.0f;
chest = 0.0f;
thigh = 0.0f;
arm = 0.0f;
biceps = 0.0f;
neck = 0.0f;
comment = "";
}
@@ -292,12 +292,12 @@ public class ScaleMeasurement implements Cloneable {
this.thigh = thigh;
}
public float getArm() {
return arm;
public float getBiceps() {
return biceps;
}
public void setArm(float arm) {
this.arm = arm;
public void setBiceps(float biceps) {
this.biceps = biceps;
}
public float getNeck() {
@@ -353,6 +353,6 @@ public class ScaleMeasurement implements Cloneable {
"MUSCLE: %.2f, LBM: %.2f, WAIST: %.2f, HIP: %.2f, BONE: %.2f, CHEST: %.2f, " +
"THIGH: %.2f, ARM: %.2f, NECK: %.2f, COMMENT: %s",
id, userId, dateTime.toString(), weight, fat, water,
muscle, lbm, waist, hip, bone, chest, thigh, arm, neck, comment);
muscle, lbm, waist, hip, bone, chest, thigh, biceps, neck, comment);
}
}

View File

@@ -23,12 +23,12 @@ import com.health.openscale.core.datatypes.ScaleMeasurement;
import com.health.openscale.core.evaluation.EvaluationResult;
import com.health.openscale.core.evaluation.EvaluationSheet;
public class ArmMeasurementView extends FloatMeasurementView {
public class BicepsMeasurementView extends FloatMeasurementView {
// Don't change key value, it may be stored persistent in preferences
public static final String KEY = "arm";
public static final String KEY = "biceps";
public ArmMeasurementView(Context context) {
super(context, R.string.label_arm, R.drawable.ic_arm);
public BicepsMeasurementView(Context context) {
super(context, R.string.label_biceps, R.drawable.ic_biceps);
}
@Override
@@ -38,12 +38,12 @@ public class ArmMeasurementView extends FloatMeasurementView {
@Override
protected float getMeasurementValue(ScaleMeasurement measurement) {
return measurement.getArm();
return measurement.getBiceps();
}
@Override
protected void setMeasurementValue(float value, ScaleMeasurement measurement) {
measurement.setArm(value);
measurement.setBiceps(value);
}
@Override

View File

@@ -118,7 +118,7 @@ public abstract class MeasurementView extends TableLayout {
unsorted.add(new WHRMeasurementView(context));
unsorted.add(new ChestMeasurementView(context));
unsorted.add(new ThighMeasurementView(context));
unsorted.add(new ArmMeasurementView(context));
unsorted.add(new BicepsMeasurementView(context));
unsorted.add(new NeckMeasurementView(context));
unsorted.add(new BMRMeasurementView(context));
unsorted.add(new CommentMeasurementView(context));

View File

@@ -57,7 +57,7 @@ public class MeasurementViewSettings {
case WaistMeasurementView.KEY:
case HipMeasurementView.KEY:
case ChestMeasurementView.KEY:
case ArmMeasurementView.KEY:
case BicepsMeasurementView.KEY:
case ThighMeasurementView.KEY:
case NeckMeasurementView.KEY:
defaultValue = false;

View File

Before

Width:  |  Height:  |  Size: 963 B

After

Width:  |  Height:  |  Size: 963 B

View File

Before

Width:  |  Height:  |  Size: 448 B

After

Width:  |  Height:  |  Size: 448 B

View File

Before

Width:  |  Height:  |  Size: 581 B

After

Width:  |  Height:  |  Size: 581 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -225,6 +225,6 @@
<string name="label_configure_widget">Configure widget</string>
<string name="label_chest">Chest circumference</string>
<string name="label_thigh">Thigh circumference</string>
<string name="label_arm">Arm circumference</string>
<string name="label_biceps">Biceps circumference</string>
<string name="label_neck">Neck circumference</string>
</resources>