Polish to the time picker

pull/14/head
Sam Bosley 12 years ago
parent 2aaf22722c
commit d0383211d6

@ -10,7 +10,7 @@
android:id="@+id/timeComponents"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dip"
android:layout_marginBottom="8dip"
android:orientation="horizontal">
<com.todoroo.astrid.ui.DeadlineNumberPicker
android:id="@+id/hours"

@ -28,13 +28,6 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<View
android:id="@+id/timepicker_left_border"
android:layout_height="fill_parent"
android:layout_width="2dip"
android:background="@color/task_edit_deadline_gray"
android:visibility="gone"
/>
<EditText android:id="@+id/timepicker_input"
android:layout_width="wrap_content"
@ -47,13 +40,6 @@
android:textColor="@color/task_edit_deadline_gray"
android:background="@android:color/transparent"
/>
<View
android:id="@+id/timepicker_right_border"
android:layout_height="fill_parent"
android:layout_width="2dip"
android:background="@color/task_edit_deadline_gray"
android:visibility="gone"
/>
</LinearLayout>
<com.todoroo.astrid.ui.NumberPickerButton android:id="@+id/decrement"

@ -71,7 +71,7 @@ public class AstridTimePicker extends LinearLayout {
int offColorValue = r.getColor(android.R.color.transparent);
int borderColorValue = r.getColor(R.color.task_edit_deadline_gray);
int cornerRadius = (int) (5 * r.getDisplayMetrics().density);
int strokeWidth = (int) (2 * r.getDisplayMetrics().density);
int strokeWidth = (int) (1 * r.getDisplayMetrics().density);
amButton.setBackgroundDrawable(CustomBorderDrawable.customButton(cornerRadius, 0, 0, cornerRadius,
onColorValue, offColorValue, borderColorValue, strokeWidth));
@ -111,8 +111,8 @@ public class AstridTimePicker extends LinearLayout {
}
};
hours.findViewById(R.id.timepicker_left_border).setVisibility(View.VISIBLE);
minutes.findViewById(R.id.timepicker_right_border).setVisibility(View.VISIBLE);
// hours.findViewById(R.id.timepicker_left_border).setVisibility(View.VISIBLE);
// minutes.findViewById(R.id.timepicker_right_border).setVisibility(View.VISIBLE);
String amString = DateUtils.getAMPMString(Calendar.AM).toUpperCase();
amButton.setTextOff(amString);

@ -158,7 +158,7 @@ public class DateAndTimePicker extends LinearLayout {
int offColorValue = r.getColor(android.R.color.transparent);
int borderColorValue = r.getColor(R.color.task_edit_deadline_gray);
int cornerRadius = (int) (5 * r.getDisplayMetrics().density);
int strokeWidth = (int) (2 * r.getDisplayMetrics().density);
int strokeWidth = (int) (1 * r.getDisplayMetrics().density);
for (int i = 0; i < urgencyValues.size(); i++) {
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, (int) (42 * metrics.density), 0);
@ -172,13 +172,13 @@ public class DateAndTimePicker extends LinearLayout {
if (i == 0) {
tb.setBackgroundDrawable(CustomBorderDrawable.customButton(cornerRadius, cornerRadius, 0, 0, onColorValue, offColorValue, borderColorValue, strokeWidth));
} else if (i == urgencyValues.size() - 2) {
lp.topMargin = (int) (-2 * metrics.density);
lp.topMargin = (int) (-1 * metrics.density);
tb.setBackgroundDrawable(CustomBorderDrawable.customButton(0, 0, cornerRadius, cornerRadius, onColorValue, offColorValue, borderColorValue, strokeWidth));
} else if (i == urgencyValues.size() - 1) {
lp.topMargin = (int) (5 * metrics.density);
tb.setBackgroundDrawable(CustomBorderDrawable.customButton(cornerRadius, cornerRadius, cornerRadius, cornerRadius, onColorValue, offColorValue, borderColorValue, strokeWidth));
} else {
lp.topMargin = (int) (-2 * metrics.density);
lp.topMargin = (int) (-1 * metrics.density);
tb.setBackgroundDrawable(CustomBorderDrawable.customButton(0, 0, 0, 0, onColorValue, offColorValue, borderColorValue, strokeWidth));
}
int verticalPadding = (int) (SHORTCUT_PADDING * metrics.density);

Loading…
Cancel
Save