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">
<!-- estimated time -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_estimatedDuration_label"
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel" />
<Button
android:id="@+id/estimatedDuration"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="50dip"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="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 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TEA_elapsedDuration_label"
style="@style/TextAppearance.GEN_EditLabel.DLG_EditLabel" />
<Button
android:id="@+id/elapsedDuration"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="50dip"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="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"/>
</LinearLayout>

@ -75,7 +75,7 @@
<!-- =============================================================== UI == -->
<!-- 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) -->

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

Loading…
Cancel
Save