mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-22 00:06:48 +02:00
Add some space to user settings layout
Also reorder the fields a bit, putting birthday and activity level earlier. The order is now: personal info, units, height and weight, and finally goal.
This commit is contained in:
@@ -139,7 +139,7 @@ public class UserAddTest {
|
|||||||
allOf(withId(R.id.rowBodyHeight),
|
allOf(withId(R.id.rowBodyHeight),
|
||||||
childAtPosition(
|
childAtPosition(
|
||||||
withId(R.id.tableUserData),
|
withId(R.id.tableUserData),
|
||||||
5)),
|
6)),
|
||||||
1)));
|
1)));
|
||||||
editText3.perform(scrollTo(), replaceText("180"), closeSoftKeyboard());
|
editText3.perform(scrollTo(), replaceText("180"), closeSoftKeyboard());
|
||||||
|
|
||||||
|
@@ -12,287 +12,259 @@
|
|||||||
android:background="?attr/colorPrimary"
|
android:background="?attr/colorPrimary"
|
||||||
android:elevation="4dp"
|
android:elevation="4dp"
|
||||||
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
|
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:id="@+id/scrollViewUserData" >
|
|
||||||
|
|
||||||
<LinearLayout
|
<TableLayout
|
||||||
|
android:id="@+id/tableUserData"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:measureWithLargestChild="true"
|
||||||
android:padding="5dp" >
|
android:padding="5dp"
|
||||||
|
android:stretchColumns="*">
|
||||||
|
|
||||||
<TableLayout
|
<TableRow
|
||||||
android:id="@+id/tableUserData"
|
android:id="@+id/rowUserName"
|
||||||
android:layout_width="match_parent"
|
android:layout_weight="1"
|
||||||
android:layout_height="wrap_content"
|
android:gravity="center_vertical">
|
||||||
android:padding="5dp"
|
|
||||||
android:stretchColumns="*" >
|
|
||||||
|
|
||||||
<TableRow
|
<TextView
|
||||||
android:id="@+id/rowUserName"
|
android:id="@+id/lblUserName"
|
||||||
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" />
|
||||||
|
|
||||||
<TextView
|
<EditText
|
||||||
android:id="@+id/lblUserName"
|
android:id="@+id/txtUserName"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:ems="10"
|
||||||
android:text="@string/label_user_name" />
|
android:inputType="text"
|
||||||
|
android:hint="@string/info_enter_user_name">
|
||||||
|
|
||||||
<EditText
|
<requestFocus />
|
||||||
android:id="@+id/txtUserName"
|
</EditText>
|
||||||
android:layout_width="wrap_content"
|
</TableRow>
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:ems="10"
|
|
||||||
android:inputType="text"
|
|
||||||
android:hint="@string/info_enter_user_name">
|
|
||||||
|
|
||||||
<requestFocus />
|
<TableRow
|
||||||
</EditText>
|
android:id="@+id/rowBirthday"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
</TableRow>
|
<TextView
|
||||||
|
android:id="@+id/lblBirthday"
|
||||||
<TableRow
|
|
||||||
android:id="@+id/rowGender"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" >
|
android:layout_height="wrap_content"
|
||||||
|
android:labelFor="@id/txtBirthday"
|
||||||
|
android:text="@string/label_birthday" />
|
||||||
|
|
||||||
<TextView
|
<EditText
|
||||||
android:id="@+id/lblGender"
|
android:id="@+id/txtBirthday"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
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_height="wrap_content"
|
|
||||||
android:text="@string/label_male"
|
|
||||||
android:id="@+id/btnRadioMale"
|
|
||||||
android:checked="true" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/label_female"
|
|
||||||
android:id="@+id/btnRadioWoman" />
|
|
||||||
|
|
||||||
</RadioGroup>
|
|
||||||
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:id="@+id/rowMeasureUnit"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" >
|
android:layout_height="wrap_content"
|
||||||
|
android:ems="10"
|
||||||
|
android:focusable="false"
|
||||||
|
android:inputType="date" />
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
<TextView
|
<TableRow
|
||||||
android:id="@+id/measureUnit"
|
android:id="@+id/rowActivityLevel"
|
||||||
android:layout_width="wrap_content"
|
android:layout_weight="1"
|
||||||
android:layout_height="wrap_content"
|
android:gravity="center_vertical">
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:text="@string/label_measure_unit" />
|
|
||||||
|
|
||||||
<RadioGroup
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/lblActivityLevel"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:id="@+id/groupMeasureUnit">
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="cm"
|
|
||||||
android:id="@+id/btnRadioCM"
|
|
||||||
android:checked="true" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="in"
|
|
||||||
android:id="@+id/btnRadioINCH" />
|
|
||||||
</RadioGroup>
|
|
||||||
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:id="@+id/rowUnit"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" >
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/label_activity_level" />
|
||||||
|
|
||||||
<TextView
|
<Spinner
|
||||||
android:id="@+id/lblUnit"
|
android:id="@+id/spinnerActivityLevel"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
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/rowActivityLevel"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" >
|
android:layout_height="wrap_content"
|
||||||
|
android:entries="@array/activity_level_entries" />
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
<TextView
|
<TableRow
|
||||||
android:id="@+id/lblActivityLevel"
|
android:id="@+id/rowGender"
|
||||||
android:layout_width="wrap_content"
|
android:layout_weight="1"
|
||||||
android:layout_height="wrap_content"
|
android:gravity="center_vertical">
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:text="@string/label_activity_level" />
|
|
||||||
|
|
||||||
<Spinner
|
<TextView
|
||||||
android:id="@+id/spinnerActivityLevel"
|
android:id="@+id/lblGender"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:entries="@array/activity_level_entries" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:id="@+id/rowBodyHeight"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" >
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/label_gender" />
|
||||||
|
|
||||||
<TextView
|
<RadioGroup
|
||||||
android:id="@+id/lblBodyHeight"
|
android:id="@+id/groupGender"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/btnRadioMale"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/label_height" />
|
android:checked="true"
|
||||||
|
android:text="@string/label_male" />
|
||||||
|
|
||||||
<EditText
|
<RadioButton
|
||||||
android:id="@+id/txtBodyHeight"
|
android:id="@+id/btnRadioWoman"
|
||||||
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_female" />
|
||||||
android:inputType="numberDecimal|numberSigned" />
|
</RadioGroup>
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
</TableRow>
|
<TableRow
|
||||||
|
android:id="@+id/rowMeasureUnit"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TableRow
|
<TextView
|
||||||
android:id="@+id/rowBirthday"
|
android:id="@+id/measureUnit"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" >
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/label_measure_unit" />
|
||||||
|
|
||||||
<TextView
|
<RadioGroup
|
||||||
android:id="@+id/lblBirthday"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:labelFor="@id/txtBirthday"
|
|
||||||
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:focusable="false"
|
|
||||||
android:inputType="date" />
|
|
||||||
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:id="@+id/tableRowInitialWeight"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" >
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:id="@+id/groupMeasureUnit">
|
||||||
|
|
||||||
<TextView
|
<RadioButton
|
||||||
android:id="@+id/lblInitialWeight"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/label_initial_weight" />
|
android:text="cm"
|
||||||
|
android:id="@+id/btnRadioCM"
|
||||||
|
android:checked="true" />
|
||||||
|
|
||||||
<EditText
|
<RadioButton
|
||||||
android:id="@+id/txtInitialWeight"
|
|
||||||
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="in"
|
||||||
android:inputType="numberDecimal|numberSigned" />
|
android:id="@+id/btnRadioINCH" />
|
||||||
</TableRow>
|
</RadioGroup>
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
<TableRow
|
<TableRow
|
||||||
android:id="@+id/rowGoalWeight"
|
android:id="@+id/rowUnit"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/lblUnit"
|
||||||
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" />
|
||||||
|
|
||||||
<TextView
|
<RadioGroup
|
||||||
android:id="@+id/lblGoalWeight"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/label_goal_weight" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/txtGoalWeight"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:ems="10"
|
|
||||||
android:inputType="numberDecimal|numberSigned" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:id="@+id/rowGoalDate"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" >
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:id="@+id/groupScaleUnit">
|
||||||
|
|
||||||
<TextView
|
<RadioButton
|
||||||
android:id="@+id/lblGoalDate"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:labelFor="@id/txtGoalDate"
|
android:text="kg"
|
||||||
android:text="@string/label_goal_date" />
|
android:id="@+id/btnRadioKG"
|
||||||
|
android:checked="true" />
|
||||||
|
|
||||||
<EditText
|
<RadioButton
|
||||||
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:text="lb"
|
||||||
android:ems="10"
|
android:id="@+id/btnRadioLB" />
|
||||||
android:focusable="false"
|
|
||||||
android:inputType="date" />
|
|
||||||
|
|
||||||
</TableRow>
|
<RadioButton
|
||||||
</TableLayout>
|
android:layout_width="wrap_content"
|
||||||
</LinearLayout>
|
android:layout_height="wrap_content"
|
||||||
|
android:text="st"
|
||||||
|
android:id="@+id/btnRadioST" />
|
||||||
|
</RadioGroup>
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
|
<TableRow
|
||||||
|
android:id="@+id/rowBodyHeight"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/lblBodyHeight"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/label_height" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/txtBodyHeight"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ems="10"
|
||||||
|
android:inputType="numberDecimal|numberSigned" />
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
|
<TableRow
|
||||||
|
android:id="@+id/tableRowInitialWeight"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/lblInitialWeight"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/label_initial_weight" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/txtInitialWeight"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ems="10"
|
||||||
|
android:inputType="numberDecimal|numberSigned" />
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
|
<TableRow
|
||||||
|
android:id="@+id/rowGoalWeight"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/lblGoalWeight"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/label_goal_weight" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/txtGoalWeight"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ems="10"
|
||||||
|
android:inputType="numberDecimal|numberSigned" />
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
|
<TableRow
|
||||||
|
android:id="@+id/rowGoalDate"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/lblGoalDate"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:labelFor="@id/txtGoalDate"
|
||||||
|
android:text="@string/label_goal_date" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/txtGoalDate"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ems="10"
|
||||||
|
android:focusable="false"
|
||||||
|
android:inputType="date" />
|
||||||
|
</TableRow>
|
||||||
|
</TableLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user