mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-27 10:15:00 +02:00
- add scroll views for small displays
- goal weight ist required - check if device has bluetooth before trying to access it
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.health.openscale"
|
||||
android:versionCode="4"
|
||||
android:versionCode="5"
|
||||
android:versionName="1.2" >
|
||||
|
||||
<uses-permission android:name="android.permission.BLUETOOTH"/>
|
||||
|
@@ -54,6 +54,7 @@ public class OpenScale {
|
||||
context = con;
|
||||
scaleDB = new ScaleDatabase(context);
|
||||
scaleUserDB = new ScaleUserDatabase(context);
|
||||
btCom = null;
|
||||
|
||||
updateScaleData();
|
||||
}
|
||||
@@ -266,7 +267,7 @@ public class OpenScale {
|
||||
}
|
||||
|
||||
public boolean clearBtScaleData() {
|
||||
if (btCom != null)
|
||||
if (btCom == null)
|
||||
return false;
|
||||
|
||||
return btCom.sendBtData("9");
|
||||
@@ -303,6 +304,7 @@ public class OpenScale {
|
||||
btCom.findBT(btDeviceName);
|
||||
btCom.start();
|
||||
} catch (IOException e) {
|
||||
btCom = null;
|
||||
Log.e("OpenScale", "Error " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
@@ -157,6 +157,12 @@ public class UserSettingsActivity extends Activity {
|
||||
validate = false;
|
||||
}
|
||||
|
||||
if( txtGoalWeight.getText().toString().length() == 0 )
|
||||
{
|
||||
txtGoalWeight.setError(getResources().getString(R.string.error_goal_weight_required));
|
||||
validate = false;
|
||||
}
|
||||
|
||||
return validate;
|
||||
}
|
||||
|
||||
|
@@ -5,176 +5,186 @@
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TableLayout
|
||||
<ScrollView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/scrollView2" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:stretchColumns="2" >
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
<TableLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:stretchColumns="2" >
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow1"
|
||||
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/weight"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_weight"
|
||||
android:layout_column="1" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtWeight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:inputType="numberDecimal|numberSigned"
|
||||
android:layout_column="2"
|
||||
android:hint="@string/info_enter_goal_weight">
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow2"
|
||||
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/fat"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_fat"
|
||||
android:layout_column="1" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtFat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:inputType="numberDecimal|numberSigned"
|
||||
android:layout_column="2"
|
||||
android:hint="@string/info_enter_value_percent" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView13"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/water"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_water"
|
||||
android:layout_column="1" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtWater"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:ems="10"
|
||||
android:inputType="numberDecimal|numberSigned"
|
||||
android:layout_column="2"
|
||||
android:hint="@string/info_enter_value_percent" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView10"
|
||||
android:id="@+id/imageView14"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/weight"
|
||||
android:src="@drawable/muscle"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_weight"
|
||||
android:layout_column="1" />
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_muscle"
|
||||
android:layout_column="1" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtWeight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:inputType="numberDecimal|numberSigned"
|
||||
android:layout_column="2"
|
||||
android:hint="@string/info_enter_goal_weight">
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
<EditText
|
||||
android:id="@+id/txtMuscle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:inputType="numberDecimal|numberSigned"
|
||||
android:layout_column="2"
|
||||
android:hint="@string/info_enter_value_percent" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow2"
|
||||
android:id="@+id/tableRow12"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView12"
|
||||
android:id="@+id/imageView15"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/fat"
|
||||
android:src="@drawable/comment"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_fat"
|
||||
android:text="@string/label_comment"
|
||||
android:layout_column="1" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtFat"
|
||||
android:id="@+id/txtComment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:inputType="numberDecimal|numberSigned"
|
||||
android:layout_column="2"
|
||||
android:hint="@string/info_enter_value_percent" />
|
||||
|
||||
android:inputType="text|textImeMultiLine|textMultiLine|textAutoComplete|textAutoCorrect"
|
||||
android:hint="@string/info_enter_comment" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
</TableLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView13"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/water"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_water"
|
||||
android:layout_column="1" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtWater"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:ems="10"
|
||||
android:inputType="numberDecimal|numberSigned"
|
||||
android:layout_column="2"
|
||||
android:hint="@string/info_enter_value_percent" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView14"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/muscle"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_muscle"
|
||||
android:layout_column="1" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtMuscle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:inputType="numberDecimal|numberSigned"
|
||||
android:layout_column="2"
|
||||
android:hint="@string/info_enter_value_percent" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow12"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView15"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/comment"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_comment"
|
||||
android:layout_column="1" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtComment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:layout_column="2"
|
||||
android:inputType="text|textImeMultiLine|textMultiLine|textAutoComplete|textAutoCorrect"
|
||||
android:hint="@string/info_enter_comment" />
|
||||
</TableRow>
|
||||
|
||||
</TableLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
<Button
|
||||
@@ -186,7 +196,7 @@
|
||||
android:text="@string/label_cancel"
|
||||
android:layout_marginRight="10dp" />
|
||||
|
||||
<Button
|
||||
<Button
|
||||
android:id="@+id/btnOk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -194,6 +204,9 @@
|
||||
android:background="@drawable/flat_selector"
|
||||
android:text="@string/label_ok" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@@ -5,257 +5,268 @@
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TableLayout
|
||||
<ScrollView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/scrollView3" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:stretchColumns="2" >
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
<TableLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:stretchColumns="2" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView16"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/weight"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
<TableRow
|
||||
android:id="@+id/tableRow1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_weight"
|
||||
android:layout_column="1" />
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtWeight"
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView16"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/weight"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_weight"
|
||||
android:layout_column="1" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtWeight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/info_enter_value_unit"
|
||||
android:inputType="numberDecimal"
|
||||
android:layout_column="2">
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/info_enter_value_unit"
|
||||
android:inputType="numberDecimal"
|
||||
android:layout_column="2">
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView17"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/fat"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
|
||||
</TableRow>
|
||||
<TextView
|
||||
android:id="@+id/txtAvgWeight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_fat"
|
||||
android:layout_column="1" />
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
<EditText
|
||||
android:id="@+id/txtFat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/info_enter_value_percent"
|
||||
android:inputType="numberDecimal"
|
||||
android:layout_column="2" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView17"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/fat"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
</TableRow>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtAvgWeight"
|
||||
<TableRow
|
||||
android:id="@+id/tableRow3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_fat"
|
||||
android:layout_column="1" />
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtFat"
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView18"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/water"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_water"
|
||||
android:layout_column="1" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtWater"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/info_enter_value_percent"
|
||||
android:inputType="numberDecimal"
|
||||
android:layout_column="2" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/info_enter_value_percent"
|
||||
android:inputType="numberDecimal"
|
||||
android:layout_column="2" />
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
</TableRow>
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView21"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/muscle"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
<TextView
|
||||
android:id="@+id/txtAvgFat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_muscle"
|
||||
android:layout_column="1" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView18"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/water"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
<EditText
|
||||
android:id="@+id/txtMuscle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/info_enter_value_percent"
|
||||
android:inputType="numberDecimal"
|
||||
android:layout_column="2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow13"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_water"
|
||||
android:layout_column="1" />
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtWater"
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView22"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/comment"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtView22"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_comment"
|
||||
android:layout_column="1" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtComment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:layout_column="2"
|
||||
android:inputType="text|textImeMultiLine|textMultiLine|textAutoComplete|textAutoCorrect"
|
||||
android:hint="@string/info_enter_comment" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/info_enter_value_percent"
|
||||
android:inputType="numberDecimal"
|
||||
android:layout_column="2" />
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
</TableRow>
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView19"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/lastmonth"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_date"
|
||||
android:layout_column="1" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView21"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/muscle"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
<EditText
|
||||
android:id="@+id/txtDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:ems="10"
|
||||
android:enabled="false"
|
||||
android:inputType="date"
|
||||
android:layout_column="2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtAvgFat"
|
||||
<Button
|
||||
android:id="@+id/btnDateSet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_set"
|
||||
android:textSize="15sp"
|
||||
android:layout_column="3" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_muscle"
|
||||
android:layout_column="1" />
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtMuscle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/info_enter_value_percent"
|
||||
android:inputType="numberDecimal"
|
||||
android:layout_column="2" />
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView20"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/daysleft"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
|
||||
</TableRow>
|
||||
<TextView
|
||||
android:id="@+id/txtAvgWater"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_time"
|
||||
android:layout_column="1" />
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow13"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
<EditText
|
||||
android:id="@+id/txtTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:ems="10"
|
||||
android:enabled="false"
|
||||
android:inputType="time"
|
||||
android:layout_column="2" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView22"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/comment"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
<Button
|
||||
android:id="@+id/btnTimeSet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_set"
|
||||
android:textSize="15sp"
|
||||
android:layout_column="3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtView22"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_comment"
|
||||
android:layout_column="1" />
|
||||
</TableRow>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtComment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:layout_column="2"
|
||||
android:inputType="text|textImeMultiLine|textMultiLine|textAutoComplete|textAutoCorrect"
|
||||
android:hint="@string/info_enter_comment" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView19"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/lastmonth"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_date"
|
||||
android:layout_column="1" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:ems="10"
|
||||
android:enabled="false"
|
||||
android:inputType="date"
|
||||
android:layout_column="2" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDateSet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_set"
|
||||
android:textSize="15sp"
|
||||
android:layout_column="3" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/imageView20"
|
||||
android:layout_column="0"
|
||||
android:src="@drawable/daysleft"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="2dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtAvgWater"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_time"
|
||||
android:layout_column="1" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:ems="10"
|
||||
android:enabled="false"
|
||||
android:inputType="time"
|
||||
android:layout_column="2" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnTimeSet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_set"
|
||||
android:textSize="15sp"
|
||||
android:layout_column="3" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
</TableLayout>
|
||||
</TableLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -281,6 +292,7 @@
|
||||
android:background="@drawable/flat_selector"
|
||||
android:text="@string/label_add" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
|
@@ -5,212 +5,223 @@
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TableLayout
|
||||
<ScrollView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/scrollView4" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:stretchColumns="*" >
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
<TableLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:stretchColumns="*" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
<TableRow
|
||||
android:id="@+id/tableRow1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_user_name" />
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtUserName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:inputType="text"
|
||||
android:hint="@string/info_enter_user_name">
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_body_height" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtBodyHeight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/info_enter_value_cm"
|
||||
android:inputType="numberDecimal|numberSigned" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_gender" />
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/groupGender">
|
||||
|
||||
<RadioButton
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_male"
|
||||
android:id="@+id/btnRadioMale"
|
||||
android:checked="true" />
|
||||
android:text="@string/label_user_name" />
|
||||
|
||||
<RadioButton
|
||||
<EditText
|
||||
android:id="@+id/txtUserName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_woman"
|
||||
android:id="@+id/btnRadioWoman" />
|
||||
android:ems="10"
|
||||
android:inputType="text"
|
||||
android:hint="@string/info_enter_user_name">
|
||||
|
||||
</RadioGroup>
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
</TableRow>
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
<TableRow
|
||||
android:id="@+id/tableRow2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_scale_unit" />
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/groupScaleUnit">
|
||||
|
||||
<RadioButton
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="kg"
|
||||
android:id="@+id/btnRadioKG"
|
||||
android:checked="true" />
|
||||
android:text="@string/label_body_height" />
|
||||
|
||||
<RadioButton
|
||||
<EditText
|
||||
android:id="@+id/txtBodyHeight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="lb"
|
||||
android:id="@+id/btnRadioLB" />
|
||||
android:ems="10"
|
||||
android:hint="@string/info_enter_value_cm"
|
||||
android:inputType="numberDecimal|numberSigned" />
|
||||
|
||||
<RadioButton
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="st"
|
||||
android:id="@+id/btnRadioST" />
|
||||
</RadioGroup>
|
||||
android:text="@string/label_gender" />
|
||||
|
||||
</TableRow>
|
||||
<RadioGroup
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/groupGender">
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
<RadioButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_male"
|
||||
android:id="@+id/btnRadioMale"
|
||||
android:checked="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
<RadioButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_woman"
|
||||
android:id="@+id/btnRadioWoman" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_birthday" />
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtBirthday"
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_scale_unit" />
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/groupScaleUnit">
|
||||
|
||||
<RadioButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="kg"
|
||||
android:id="@+id/btnRadioKG"
|
||||
android:checked="true" />
|
||||
|
||||
<RadioButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="lb"
|
||||
android:id="@+id/btnRadioLB" />
|
||||
|
||||
<RadioButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="st"
|
||||
android:id="@+id/btnRadioST" />
|
||||
</RadioGroup>
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:ems="10"
|
||||
android:enabled="false"
|
||||
android:inputType="date" />
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDateSet"
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_birthday" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtBirthday"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:ems="10"
|
||||
android:enabled="false"
|
||||
android:inputType="date" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDateSet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_set"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_set"
|
||||
android:textSize="15sp" />
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
</TableRow>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_goal_weight" />
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
<EditText
|
||||
android:id="@+id/txtGoalWeight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/info_enter_goal_weight"
|
||||
android:inputType="numberDecimal|numberSigned" />
|
||||
</TableRow>
|
||||
|
||||
<TextView
|
||||
<TableRow
|
||||
android:id="@+id/tableRow7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_goal_weight" />
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtGoalWeight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/info_enter_goal_weight"
|
||||
android:inputType="numberDecimal|numberSigned" />
|
||||
</TableRow>
|
||||
<TextView
|
||||
android:id="@+id/textView7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_goal_date" />
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
<EditText
|
||||
android:id="@+id/txtGoalDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:ems="10"
|
||||
android:enabled="false"
|
||||
android:inputType="date" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_goal_date" />
|
||||
<Button
|
||||
android:id="@+id/btnGoalDateSet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_set"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtGoalDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:ems="10"
|
||||
android:enabled="false"
|
||||
android:inputType="date" />
|
||||
</TableRow>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnGoalDateSet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_set"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
</TableLayout>
|
||||
</TableLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
<Button
|
||||
@@ -240,5 +251,11 @@
|
||||
android:text="@string/label_ok" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@@ -92,4 +92,5 @@
|
||||
<string name="title_overview">Übersicht</string>
|
||||
<string name="title_users">Benutzer</string>
|
||||
<string name="label_add_user">Benutzer hinzufügen</string>
|
||||
<string name="error_goal_weight_required">Fehler Zielgewicht ist erforderlich!</string>
|
||||
</resources>
|
@@ -92,4 +92,5 @@
|
||||
<string name="info_enter_value_unit">あなたの値を入力してください</string>
|
||||
<string name="question_really_delete_all">あなたは本当にすべてのレコードを削除しますか</string>
|
||||
<string name="question_really_delete_user">あなたが本当にユーザーを削除しますか</string>
|
||||
<string name="error_goal_weight_required">目標体重が必要です</string>
|
||||
</resources>
|
@@ -68,6 +68,7 @@
|
||||
<string name="error_importing">Error importing</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_goal_weight_required">Error goal weight is required!</string>
|
||||
|
||||
<string name="info_data_deleted">Database entry deleted!</string>
|
||||
<string name="info_data_all_deleted">All database entries deleted!</string>
|
||||
|
Reference in New Issue
Block a user