forked from upstream-mirrors/OpenTracks
Improve layout for entering weight
This commit is contained in:
@@ -32,11 +32,12 @@ limitations under the License.
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:orientation="vertical" >
|
android:orientation="vertical" >
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/choose_activity_type_weight_label"
|
||||||
android:layout_marginBottom="2dp"
|
android:layout_marginBottom="2dp"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:text="@string/settings_stats_weight"
|
android:paddingLeft="12dp"
|
||||||
style="@style/TextMedium" />
|
style="@style/TextMedium" />
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/choose_activity_type_weight"
|
android:id="@+id/choose_activity_type_weight"
|
||||||
|
|||||||
@@ -555,7 +555,15 @@ limitations under the License.
|
|||||||
translation_description="Label for a track segment">
|
translation_description="Label for a track segment">
|
||||||
Segment
|
Segment
|
||||||
</string>
|
</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 -->
|
<!-- Eula -->
|
||||||
<string name="eula_accept"
|
<string name="eula_accept"
|
||||||
translation_description="In the 'Terms of Service' dialog, the button to accept.">
|
translation_description="In the 'Terms of Service' dialog, the button to accept.">
|
||||||
|
|||||||
+7
-1
@@ -91,9 +91,15 @@ public class ChooseActivityTypeDialogFragment extends DialogFragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
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);
|
GridView gridView = (GridView) view.findViewById(R.id.choose_activity_type_grid_view);
|
||||||
weightContainer = view.findViewById(R.id.choose_activity_type_weight_container);
|
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);
|
weight = (TextView) view.findViewById(R.id.choose_activity_type_weight);
|
||||||
|
|
||||||
List<Integer> imageIds = new ArrayList<Integer>();
|
List<Integer> imageIds = new ArrayList<Integer>();
|
||||||
|
|||||||
Reference in New Issue
Block a user