Improve layout for entering weight

This commit is contained in:
Jimmy Shih
2013-11-14 14:31:56 -08:00
parent 2bd5734386
commit 7585c80906
3 changed files with 18 additions and 3 deletions
+2 -1
View File
@@ -32,11 +32,12 @@ limitations under the License.
android:layout_width="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/choose_activity_type_weight_label"
android:layout_marginBottom="2dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="4dp"
android:text="@string/settings_stats_weight"
android:paddingLeft="12dp"
style="@style/TextMedium" />
<EditText
android:id="@+id/choose_activity_type_weight"
+9 -1
View File
@@ -555,7 +555,15 @@ limitations under the License.
translation_description="Label for a track segment">
Segment
</string>
<string name="description_weight_imperial"
translation_description="Label for weight in pounds.">
Weight (lb)
</string>
<string name="description_weight_metric"
translation_description="Label for weight in kilograms.">
Weight (kg)
</string>
<!-- Eula -->
<string name="eula_accept"
translation_description="In the 'Terms of Service' dialog, the button to accept.">
@@ -91,9 +91,15 @@ public class ChooseActivityTypeDialogFragment extends DialogFragment {
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
View view = getActivity().getLayoutInflater().inflate(R.layout.choose_activity_type, null);
View view = getActivity().getLayoutInflater().inflate(R.layout.choose_activity_type, null);
GridView gridView = (GridView) view.findViewById(R.id.choose_activity_type_grid_view);
weightContainer = view.findViewById(R.id.choose_activity_type_weight_container);
TextView weightLabel = (TextView) view.findViewById(R.id.choose_activity_type_weight_label);
weightLabel.setText(
PreferencesUtils.isMetricUnits(getActivity()) ? R.string.description_weight_metric
: R.string.description_weight_imperial);
weight = (TextView) view.findViewById(R.id.choose_activity_type_weight);
List<Integer> imageIds = new ArrayList<Integer>();