Polish to the timer control set

pull/14/head
Sam Bosley 12 years ago
parent fef2483891
commit 219c50ceb7

@ -13,26 +13,50 @@
android:paddingRight="5dip"> android:paddingRight="5dip">
<!-- estimated time --> <!-- estimated time -->
<TextView <LinearLayout
android:layout_width="wrap_content" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="50dip"
android:text="@string/TEA_estimatedDuration_label" android:gravity="center_vertical"
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel" /> android:orientation="horizontal">
<Button <TextView
android:id="@+id/estimatedDuration" android:layout_width="wrap_content"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_height="wrap_content" /> android:text="@string/TEA_estimatedDuration_label"
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel" />
<TextView
android:id="@+id/estimatedDuration"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:paddingLeft="10dip"
style="@style/TextAppearance.EditRowDisplay" />
</LinearLayout>
<View
android:id="@+id/TEA_Separator"
android:layout_width="fill_parent"
android:layout_height="1px"
style="@style/TEA_Separator" />
<!-- elapsed time --> <!-- elapsed time -->
<TextView <LinearLayout
android:layout_width="wrap_content" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="50dip"
android:text="@string/TEA_elapsedDuration_label" android:gravity="center_vertical"
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel" /> android:orientation="horizontal">
<Button <TextView
android:id="@+id/elapsedDuration" android:layout_width="wrap_content"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_height="wrap_content" /> android:text="@string/TEA_elapsedDuration_label"
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel" />
<TextView
android:id="@+id/elapsedDuration"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:paddingLeft="10dip"
style="@style/TextAppearance.EditRowDisplay" />
</LinearLayout>
<include layout="@layout/control_dialog_ok"/> <include layout="@layout/control_dialog_ok"/>
</LinearLayout> </LinearLayout>

@ -75,7 +75,7 @@
<!-- =============================================================== UI == --> <!-- =============================================================== UI == -->
<!-- Label for DateButtons with no value --> <!-- Label for DateButtons with no value -->
<string name="WID_dateButtonUnset">Click To Set</string> <string name="WID_dateButtonUnset">Click to set</string>
<!-- String formatter for DateButtons ($D => date, $T => time) --> <!-- String formatter for DateButtons ($D => date, $T => time) -->

@ -9,7 +9,7 @@ import android.app.Activity;
import android.content.res.Resources; import android.content.res.Resources;
import android.text.format.DateUtils; import android.text.format.DateUtils;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.TextView;
import com.timsu.astrid.R; import com.timsu.astrid.R;
import com.todoroo.andlib.data.Property.IntegerProperty; import com.todoroo.andlib.data.Property.IntegerProperty;
@ -22,7 +22,7 @@ public class TimeDurationControlSet implements OnNNumberPickedListener,
View.OnClickListener { View.OnClickListener {
private final Activity activity; private final Activity activity;
private final Button timeButton; private final TextView timeButton;
private final int prefixResource; private final int prefixResource;
private int timeDuration; private int timeDuration;
private int[] initialValues = null; private int[] initialValues = null;
@ -40,8 +40,8 @@ public class TimeDurationControlSet implements OnNNumberPickedListener,
this.titleResource = titleResource; this.titleResource = titleResource;
this.property = property; this.property = property;
timeButton = (Button)view.findViewById(timeButtonId); timeButton = (TextView)view.findViewById(timeButtonId);
timeButton.setOnClickListener(this); ((View) timeButton.getParent()).setOnClickListener(this);
} }
public void setModel(Task model) { public void setModel(Task model) {

Loading…
Cancel
Save