1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-28 10:40:47 +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:
OliE
2015-06-30 19:42:40 +02:00
parent f34d10ccea
commit f6f467699b
9 changed files with 574 additions and 521 deletions

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.health.openscale" package="com.health.openscale"
android:versionCode="4" android:versionCode="5"
android:versionName="1.2" > android:versionName="1.2" >
<uses-permission android:name="android.permission.BLUETOOTH"/> <uses-permission android:name="android.permission.BLUETOOTH"/>

View File

@@ -54,6 +54,7 @@ public class OpenScale {
context = con; context = con;
scaleDB = new ScaleDatabase(context); scaleDB = new ScaleDatabase(context);
scaleUserDB = new ScaleUserDatabase(context); scaleUserDB = new ScaleUserDatabase(context);
btCom = null;
updateScaleData(); updateScaleData();
} }
@@ -266,7 +267,7 @@ public class OpenScale {
} }
public boolean clearBtScaleData() { public boolean clearBtScaleData() {
if (btCom != null) if (btCom == null)
return false; return false;
return btCom.sendBtData("9"); return btCom.sendBtData("9");
@@ -303,6 +304,7 @@ public class OpenScale {
btCom.findBT(btDeviceName); btCom.findBT(btDeviceName);
btCom.start(); btCom.start();
} catch (IOException e) { } catch (IOException e) {
btCom = null;
Log.e("OpenScale", "Error " + e.getMessage()); Log.e("OpenScale", "Error " + e.getMessage());
} }
} }

View File

@@ -157,6 +157,12 @@ public class UserSettingsActivity extends Activity {
validate = false; validate = false;
} }
if( txtGoalWeight.getText().toString().length() == 0 )
{
txtGoalWeight.setError(getResources().getString(R.string.error_goal_weight_required));
validate = false;
}
return validate; return validate;
} }

View File

@@ -5,176 +5,186 @@
android:orientation="vertical" android:orientation="vertical"
android:padding="5dp" > 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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:padding="5dp" android:orientation="vertical"
android:stretchColumns="2" > android:padding="5dp" >
<TableRow <TableLayout
android:id="@+id/tableRow1" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="wrap_content"
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 <ImageView
android:layout_width="30dp" android:layout_width="30dp"
android:layout_height="30dp" android:layout_height="30dp"
android:id="@+id/imageView10" android:id="@+id/imageView14"
android:layout_column="0" android:layout_column="0"
android:src="@drawable/weight" android:src="@drawable/muscle"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginRight="2dp" /> android:layout_marginRight="2dp" />
<TextView <TextView
android:id="@+id/textView1" android:layout_width="wrap_content"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:text="@string/label_muscle"
android:text="@string/label_weight" android:layout_column="1" />
android:layout_column="1" />
<EditText <EditText
android:id="@+id/txtWeight" android:id="@+id/txtMuscle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ems="10" android:ems="10"
android:inputType="numberDecimal|numberSigned" android:inputType="numberDecimal|numberSigned"
android:layout_column="2" android:layout_column="2"
android:hint="@string/info_enter_goal_weight"> android:hint="@string/info_enter_value_percent" />
<requestFocus />
</EditText>
</TableRow> </TableRow>
<TableRow <TableRow
android:id="@+id/tableRow2" android:id="@+id/tableRow12"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" > android:layout_height="wrap_content">
<ImageView <ImageView
android:layout_width="30dp" android:layout_width="30dp"
android:layout_height="30dp" android:layout_height="30dp"
android:id="@+id/imageView12" android:id="@+id/imageView15"
android:layout_column="0" android:layout_column="0"
android:src="@drawable/fat" android:src="@drawable/comment"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginRight="2dp" /> android:layout_marginRight="2dp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/label_fat" android:text="@string/label_comment"
android:layout_column="1" /> android:layout_column="1" />
<EditText <EditText
android:id="@+id/txtFat" android:id="@+id/txtComment"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ems="10" android:ems="10"
android:inputType="numberDecimal|numberSigned"
android:layout_column="2" 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>
<TableRow </TableLayout>
android:id="@+id/tableRow5"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<ImageView <LinearLayout
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
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" > android:layout_height="wrap_content" >
<Button <Button
@@ -186,7 +196,7 @@
android:text="@string/label_cancel" android:text="@string/label_cancel"
android:layout_marginRight="10dp" /> android:layout_marginRight="10dp" />
<Button <Button
android:id="@+id/btnOk" android:id="@+id/btnOk"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -194,6 +204,9 @@
android:background="@drawable/flat_selector" android:background="@drawable/flat_selector"
android:text="@string/label_ok" /> android:text="@string/label_ok" />
</LinearLayout> </LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</LinearLayout>

View File

@@ -5,257 +5,268 @@
android:orientation="vertical" android:orientation="vertical"
android:padding="5dp" > 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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:padding="5dp" android:orientation="vertical"
android:stretchColumns="2" > android:padding="5dp" >
<TableRow <TableLayout
android:id="@+id/tableRow1" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_height="wrap_content" > android:padding="5dp"
android:stretchColumns="2" >
<ImageView <TableRow
android:layout_width="30dp" android:id="@+id/tableRow1"
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_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content" >
android:text="@string/label_weight"
android:layout_column="1" />
<EditText <ImageView
android:id="@+id/txtWeight" 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_width="wrap_content"
android:layout_height="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 /> <ImageView
</EditText> 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 <EditText
android:id="@+id/tableRow2" android:id="@+id/txtFat"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="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 </TableRow>
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" />
<TextView <TableRow
android:id="@+id/txtAvgWeight" android:id="@+id/tableRow3"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content" >
android:text="@string/label_fat"
android:layout_column="1" />
<EditText <ImageView
android:id="@+id/txtFat" 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_width="wrap_content"
android:layout_height="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> <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 <TextView
android:id="@+id/tableRow3" android:id="@+id/txtAvgFat"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" > android:layout_height="wrap_content"
android:text="@string/label_muscle"
android:layout_column="1" />
<ImageView <EditText
android:layout_width="30dp" android:id="@+id/txtMuscle"
android:layout_height="30dp" android:layout_width="wrap_content"
android:id="@+id/imageView18" android:layout_height="wrap_content"
android:layout_column="0" android:ems="10"
android:src="@drawable/water" android:hint="@string/info_enter_value_percent"
android:layout_gravity="center" android:inputType="numberDecimal"
android:layout_marginRight="2dp" /> android:layout_column="2" />
<TextView </TableRow>
android:id="@+id/textView3"
<TableRow
android:id="@+id/tableRow13"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content" >
android:text="@string/label_water"
android:layout_column="1" />
<EditText <ImageView
android:id="@+id/txtWater" 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_width="wrap_content"
android:layout_height="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> <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 <TextView
android:id="@+id/tableRow4" android:id="@+id/textView5"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" > android:layout_height="wrap_content"
android:text="@string/label_date"
android:layout_column="1" />
<ImageView <EditText
android:layout_width="30dp" android:id="@+id/txtDate"
android:layout_height="30dp" android:layout_width="wrap_content"
android:id="@+id/imageView21" android:layout_height="wrap_content"
android:layout_column="0" android:layout_weight="5"
android:src="@drawable/muscle" android:ems="10"
android:layout_gravity="center" android:enabled="false"
android:layout_marginRight="2dp" /> android:inputType="date"
android:layout_column="2" />
<TextView <Button
android:id="@+id/txtAvgFat" 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_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content" >
android:text="@string/label_muscle"
android:layout_column="1" />
<EditText <ImageView
android:id="@+id/txtMuscle" android:layout_width="30dp"
android:layout_width="wrap_content" android:layout_height="30dp"
android:layout_height="wrap_content" android:id="@+id/imageView20"
android:ems="10" android:layout_column="0"
android:hint="@string/info_enter_value_percent" android:src="@drawable/daysleft"
android:inputType="numberDecimal" android:layout_gravity="center"
android:layout_column="2" /> 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 <EditText
android:id="@+id/tableRow13" android:id="@+id/txtTime"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="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 <Button
android:layout_width="30dp" android:id="@+id/btnTimeSet"
android:layout_height="30dp" android:layout_width="wrap_content"
android:id="@+id/imageView22" android:layout_height="wrap_content"
android:layout_column="0" android:text="@string/label_set"
android:src="@drawable/comment" android:textSize="15sp"
android:layout_gravity="center" android:layout_column="3" />
android:layout_marginRight="2dp" />
<TextView </TableRow>
android:id="@+id/txtView22"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_comment"
android:layout_column="1" />
<EditText </TableLayout>
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>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -281,6 +292,7 @@
android:background="@drawable/flat_selector" android:background="@drawable/flat_selector"
android:text="@string/label_add" /> android:text="@string/label_add" />
</LinearLayout> </LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout> </LinearLayout>

View File

@@ -5,212 +5,223 @@
android:orientation="vertical" android:orientation="vertical"
android:padding="5dp" > 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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:padding="5dp" android:orientation="vertical"
android:stretchColumns="*" > android:padding="5dp" >
<TableRow <TableLayout
android:id="@+id/tableRow1" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_height="wrap_content" > android:padding="5dp"
android:stretchColumns="*" >
<TextView <TableRow
android:id="@+id/textView1" android:id="@+id/tableRow1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content" >
android:text="@string/label_user_name" />
<EditText <TextView
android:id="@+id/txtUserName" android:id="@+id/textView1"
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
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/label_male" android:text="@string/label_user_name" />
android:id="@+id/btnRadioMale"
android:checked="true" />
<RadioButton <EditText
android:id="@+id/txtUserName"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/label_woman" android:ems="10"
android:id="@+id/btnRadioWoman" /> android:inputType="text"
android:hint="@string/info_enter_user_name">
</RadioGroup> <requestFocus />
</EditText>
</TableRow> </TableRow>
<TableRow <TableRow
android:id="@+id/tableRow4" android:id="@+id/tableRow2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content" >
android:text="@string/label_scale_unit" />
<RadioGroup <TextView
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_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="kg" android:text="@string/label_body_height" />
android:id="@+id/btnRadioKG"
android:checked="true" />
<RadioButton <EditText
android:id="@+id/txtBodyHeight"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="lb" android:ems="10"
android:id="@+id/btnRadioLB" /> 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_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="st" android:text="@string/label_gender" />
android:id="@+id/btnRadioST" />
</RadioGroup>
</TableRow> <RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="1"
android:orientation="horizontal"
android:id="@+id/groupGender">
<TableRow <RadioButton
android:id="@+id/tableRow5" android:layout_width="wrap_content"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_height="wrap_content" > android:text="@string/label_male"
android:id="@+id/btnRadioMale"
android:checked="true" />
<TextView <RadioButton
android:id="@+id/textView5" 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_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content" >
android:text="@string/label_birthday" />
<EditText <TextView
android:id="@+id/txtBirthday" 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_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content" >
android:layout_weight="5"
android:ems="10"
android:enabled="false"
android:inputType="date" />
<Button <TextView
android:id="@+id/btnDateSet" 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_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content" >
android:text="@string/label_set"
android:textSize="15sp" />
</TableRow> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_goal_weight" />
<TableRow <EditText
android:id="@+id/tableRow6" android:id="@+id/txtGoalWeight"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="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_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content" >
android:text="@string/label_goal_weight" />
<EditText <TextView
android:id="@+id/txtGoalWeight" android:id="@+id/textView7"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ems="10" android:text="@string/label_goal_date" />
android:hint="@string/info_enter_goal_weight"
android:inputType="numberDecimal|numberSigned" />
</TableRow>
<TableRow <EditText
android:id="@+id/tableRow7" android:id="@+id/txtGoalDate"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" > android:layout_height="wrap_content"
android:layout_weight="5"
android:ems="10"
android:enabled="false"
android:inputType="date" />
<TextView <Button
android:id="@+id/textView7" android:id="@+id/btnGoalDateSet"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/label_goal_date" /> android:text="@string/label_set"
android:textSize="15sp" />
<EditText </TableRow>
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" />
<Button </TableLayout>
android:id="@+id/btnGoalDateSet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_set"
android:textSize="15sp" />
</TableRow>
</TableLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" > android:layout_height="wrap_content" >
<Button <Button
@@ -240,5 +251,11 @@
android:text="@string/label_ok" /> android:text="@string/label_ok" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView>
</LinearLayout>

View File

@@ -92,4 +92,5 @@
<string name="title_overview">Übersicht</string> <string name="title_overview">Übersicht</string>
<string name="title_users">Benutzer</string> <string name="title_users">Benutzer</string>
<string name="label_add_user">Benutzer hinzufügen</string> <string name="label_add_user">Benutzer hinzufügen</string>
<string name="error_goal_weight_required">Fehler Zielgewicht ist erforderlich!</string>
</resources> </resources>

View File

@@ -92,4 +92,5 @@
<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>
<string name="question_really_delete_user">あなたが本当にユーザーを削除しますか</string> <string name="question_really_delete_user">あなたが本当にユーザーを削除しますか</string>
<string name="error_goal_weight_required">目標体重が必要です</string>
</resources> </resources>

View File

@@ -68,6 +68,7 @@
<string name="error_importing">Error importing</string> <string name="error_importing">Error importing</string>
<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="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>