Cleaned up date picker layouts so they look the same on all devices

pull/14/head
Sam Bosley 13 years ago
parent 6eb564ff00
commit 5bc4515caa

@ -35,7 +35,7 @@
<ToggleButton <ToggleButton
android:id="@+id/am_button" android:id="@+id/am_button"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="42dip"
android:paddingTop="8dip" android:paddingTop="8dip"
android:paddingBottom="8dip" android:paddingBottom="8dip"
android:textSize="18sp" android:textSize="18sp"
@ -47,7 +47,7 @@
<ToggleButton <ToggleButton
android:id="@+id/pm_button" android:id="@+id/pm_button"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="42dip"
android:paddingTop="8dip" android:paddingTop="8dip"
android:paddingBottom="8dip" android:paddingBottom="8dip"
android:textSize="18sp" android:textSize="18sp"
@ -61,7 +61,7 @@
<ToggleButton <ToggleButton
android:id="@+id/hasTime" android:id="@+id/hasTime"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="42dip"
android:paddingTop="8dip" android:paddingTop="8dip"
android:paddingBottom="8dip" android:paddingBottom="8dip"
android:textSize="18sp" android:textSize="18sp"

@ -20,7 +20,7 @@
<com.todoroo.astrid.ui.NumberPickerButton android:id="@+id/increment" <com.todoroo.astrid.ui.NumberPickerButton android:id="@+id/increment"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="36dip" android:layout_height="38dip"
android:src="@drawable/icn_arrow_up" android:src="@drawable/icn_arrow_up"
/> />
@ -38,7 +38,7 @@
<EditText android:id="@+id/timepicker_input" <EditText android:id="@+id/timepicker_input"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="40dip"
android:layout_weight="1" android:layout_weight="1"
style="?android:attr/textAppearanceLarge" style="?android:attr/textAppearanceLarge"
android:gravity="center" android:gravity="center"
@ -58,7 +58,7 @@
<com.todoroo.astrid.ui.NumberPickerButton android:id="@+id/decrement" <com.todoroo.astrid.ui.NumberPickerButton android:id="@+id/decrement"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="36dip" android:layout_height="38dip"
android:src="@drawable/icn_arrow_down" android:src="@drawable/icn_arrow_down"
android:paddingTop="15dip" android:paddingTop="15dip"
/> />

@ -134,7 +134,7 @@ public class DateAndTimePicker extends LinearLayout {
DisplayMetrics metrics = context.getResources().getDisplayMetrics(); DisplayMetrics metrics = context.getResources().getDisplayMetrics();
for (int i = 0; i < urgencyValues.size(); i++) { for (int i = 0; i < urgencyValues.size(); i++) {
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT, 0); LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, (int) (42 * metrics.density), 0);
UrgencyValue uv = urgencyValues.get(i); UrgencyValue uv = urgencyValues.get(i);
ToggleButton tb = new ToggleButton(context); ToggleButton tb = new ToggleButton(context);

Loading…
Cancel
Save