All new images for the new edit layout

pull/14/head
Sam Bosley 11 years ago
parent 1be8194cef
commit bf8a9fff23

@ -21,6 +21,7 @@ import android.view.View.OnClickListener;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener; import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.Spinner; import android.widget.Spinner;
import android.widget.TextView; import android.widget.TextView;
@ -56,6 +57,7 @@ public class GCalControlSet extends PopupControlSet {
private boolean hasEvent = false; private boolean hasEvent = false;
private Spinner calendarSelector; private Spinner calendarSelector;
private final int title; private final int title;
private final ImageView image;
public GCalControlSet(final Activity activity, int viewLayout, int displayViewLayout, int title) { public GCalControlSet(final Activity activity, int viewLayout, int displayViewLayout, int title) {
super(activity, viewLayout, displayViewLayout, title); super(activity, viewLayout, displayViewLayout, title);
@ -63,6 +65,7 @@ public class GCalControlSet extends PopupControlSet {
this.title = title; this.title = title;
calendars = Calendars.getCalendars(); calendars = Calendars.getCalendars();
getView(); // Hack to force initialized getView(); // Hack to force initialized
image = (ImageView) getDisplayView().findViewById(R.id.display_row_icon);
} }
@Override @Override
@ -228,6 +231,7 @@ public class GCalControlSet extends PopupControlSet {
protected void refreshDisplayView() { protected void refreshDisplayView() {
TextView calendar = (TextView) getDisplayView().findViewById(R.id.calendar_display_which); TextView calendar = (TextView) getDisplayView().findViewById(R.id.calendar_display_which);
calendar.setTextColor(themeColor); calendar.setTextColor(themeColor);
image.setImageResource(R.drawable.tea_icn_addcal);
if (initialized) { if (initialized) {
if (hasEvent) { if (hasEvent) {
calendar.setText(R.string.gcal_TEA_has_event); calendar.setText(R.string.gcal_TEA_has_event);
@ -235,6 +239,7 @@ public class GCalControlSet extends PopupControlSet {
calendar.setText((String)calendarSelector.getSelectedItem()); calendar.setText((String)calendarSelector.getSelectedItem());
} else { } else {
calendar.setTextColor(unsetColor); calendar.setTextColor(unsetColor);
image.setImageResource(R.drawable.tea_icn_addcal_gray);
calendar.setText(R.string.gcal_TEA_none_selected); calendar.setText(R.string.gcal_TEA_none_selected);
} }
} else { } else {
@ -245,6 +250,7 @@ public class GCalControlSet extends PopupControlSet {
calendar.setText(calendars.calendars[index]); calendar.setText(calendars.calendars[index]);
} else { } else {
calendar.setTextColor(unsetColor); calendar.setTextColor(unsetColor);
image.setImageResource(R.drawable.tea_icn_addcal_gray);
calendar.setText(R.string.gcal_TEA_none_selected); calendar.setText(R.string.gcal_TEA_none_selected);
} }
} }

@ -9,6 +9,7 @@ import android.app.Activity;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.format.DateUtils; import android.text.format.DateUtils;
import android.view.View; import android.view.View;
import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import com.timsu.astrid.R; import com.timsu.astrid.R;
@ -29,6 +30,7 @@ public class TimerControlSet extends PopupControlSet implements TimerActionListe
TimeDurationTaskEditControlSet estimated, elapsed; TimeDurationTaskEditControlSet estimated, elapsed;
private final TextView displayEdit; private final TextView displayEdit;
private final ImageView image;
public TimerControlSet(final Activity activity, int viewLayout, int displayViewLayout, int title) { public TimerControlSet(final Activity activity, int viewLayout, int displayViewLayout, int title) {
super(activity, viewLayout, displayViewLayout, title); super(activity, viewLayout, displayViewLayout, title);
@ -37,6 +39,8 @@ public class TimerControlSet extends PopupControlSet implements TimerActionListe
displayEdit.setText(R.string.TEA_timer_controls); displayEdit.setText(R.string.TEA_timer_controls);
displayEdit.setTextColor(unsetColor); displayEdit.setTextColor(unsetColor);
image = (ImageView) getDisplayView().findViewById(R.id.display_row_icon);
estimated = new TimeDurationTaskEditControlSet(activity, getView(), Task.ESTIMATED_SECONDS, estimated = new TimeDurationTaskEditControlSet(activity, getView(), Task.ESTIMATED_SECONDS,
R.id.estimatedDuration, 0, R.string.DLG_hour_minutes R.id.estimatedDuration, 0, R.string.DLG_hour_minutes
); );
@ -132,9 +136,11 @@ public class TimerControlSet extends PopupControlSet implements TimerActionListe
if (!TextUtils.isEmpty(toDisplay)) { if (!TextUtils.isEmpty(toDisplay)) {
displayEdit.setText(toDisplay); displayEdit.setText(toDisplay);
displayEdit.setTextColor(themeColor); displayEdit.setTextColor(themeColor);
image.setImageResource(R.drawable.tea_icn_timer);
} else { } else {
displayEdit.setText(R.string.TEA_timer_controls); displayEdit.setText(R.string.TEA_timer_controls);
displayEdit.setTextColor(unsetColor); displayEdit.setTextColor(unsetColor);
image.setImageResource(R.drawable.tea_icn_timer_gray);
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

@ -21,9 +21,7 @@
<ImageView android:id="@+id/display_row_icon" <ImageView android:id="@+id/display_row_icon"
android:layout_marginRight="10dip" android:layout_marginRight="10dip"
android:layout_width="20dip" android:layout_width="20dip"
android:layout_height="20dip" android:layout_height="20dip"/>
android:scaleType="fitCenter"
android:background="#ff0000"/>
<TextView <TextView
android:id="@+id/display_row_edit" android:id="@+id/display_row_edit"
android:layout_width="fill_parent" android:layout_width="fill_parent"

@ -22,8 +22,7 @@
android:layout_marginRight="10dip" android:layout_marginRight="10dip"
android:layout_width="20dip" android:layout_width="20dip"
android:layout_height="20dip" android:layout_height="20dip"
android:scaleType="fitCenter" android:scaleType="fitCenter"/>
android:background="#ff0000"/>
<TextView <TextView
android:id="@+id/display_row_edit" android:id="@+id/display_row_edit"
android:layout_width="fill_parent" android:layout_width="fill_parent"

@ -16,9 +16,11 @@
android:layout_height="50dip" android:layout_height="50dip"
android:paddingLeft="5dip" android:paddingLeft="5dip"
android:gravity="center_vertical"> android:gravity="center_vertical">
<ImageView <ImageView android:id="@+id/display_row_icon"
style="@style/EditRowImage" android:layout_marginRight="10dip"
android:src="@drawable/icn_edit_calendar"/> android:layout_width="20dip"
android:layout_height="20dip"
android:scaleType="fitCenter"/>
<TextView <TextView
android:id="@+id/calendar_display_which" android:id="@+id/calendar_display_which"
android:layout_width="fill_parent" android:layout_width="fill_parent"
@ -27,7 +29,6 @@
android:gravity="left" android:gravity="left"
android:maxLines="1" android:maxLines="1"
android:ellipsize="end" android:ellipsize="end"
android:paddingLeft="5dip"
style="@style/TextAppearance.EditRowDisplay" /> style="@style/TextAppearance.EditRowDisplay" />
</LinearLayout> </LinearLayout>
<View <View

@ -58,9 +58,11 @@ public class DeadlineControlSet extends PopupControlSet {
if (TextUtils.isEmpty(displayString)) { if (TextUtils.isEmpty(displayString)) {
dateDisplay.setText(R.string.TEA_deadline_hint); dateDisplay.setText(R.string.TEA_deadline_hint);
dateDisplay.setTextColor(unsetColor); dateDisplay.setTextColor(unsetColor);
image.setImageResource(R.drawable.tea_icn_date_gray);
} else { } else {
dateDisplay.setText(displayString); dateDisplay.setText(displayString);
dateDisplay.setTextColor(themeColor); dateDisplay.setTextColor(themeColor);
image.setImageResource(R.drawable.tea_icn_date);
} }
} }

@ -13,6 +13,7 @@ import android.view.View.OnClickListener;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener; import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.Spinner; import android.widget.Spinner;
import android.widget.TextView; import android.widget.TextView;
@ -39,12 +40,14 @@ public class HideUntilControlSet extends PopupControlSet implements OnItemSelect
private int previousSetting = Task.HIDE_UNTIL_NONE; private int previousSetting = Task.HIDE_UNTIL_NONE;
private final int title; private final int title;
private int selection; private int selection;
private final ImageView image;
private long existingDate = EXISTING_TIME_UNSET; private long existingDate = EXISTING_TIME_UNSET;
public HideUntilControlSet(Activity activity, int viewLayout, int displayViewLayout, int title) { public HideUntilControlSet(Activity activity, int viewLayout, int displayViewLayout, int title) {
super(activity, viewLayout, displayViewLayout, title); super(activity, viewLayout, displayViewLayout, title);
this.title = title; this.title = title;
image = (ImageView) getDisplayView().findViewById(R.id.display_row_icon);
} }
private ArrayAdapter<HideUntilValue> adapter; private ArrayAdapter<HideUntilValue> adapter;
@ -197,6 +200,7 @@ public class HideUntilControlSet extends PopupControlSet implements OnItemSelect
if (value.setting == Task.HIDE_UNTIL_NONE) { if (value.setting == Task.HIDE_UNTIL_NONE) {
auxDisplay.setText(R.string.TEA_hideUntil_label); auxDisplay.setText(R.string.TEA_hideUntil_label);
auxDisplay.setTextColor(unsetColor); auxDisplay.setTextColor(unsetColor);
image.setImageResource(R.drawable.tea_icn_hide_gray);
} else { } else {
String display = value.toString(); String display = value.toString();
if (value.setting != Task.HIDE_UNTIL_SPECIFIC_DAY && value.setting != Task.HIDE_UNTIL_SPECIFIC_DAY_TIME) if (value.setting != Task.HIDE_UNTIL_SPECIFIC_DAY && value.setting != Task.HIDE_UNTIL_SPECIFIC_DAY_TIME)
@ -204,6 +208,7 @@ public class HideUntilControlSet extends PopupControlSet implements OnItemSelect
auxDisplay.setText(activity.getString(R.string.TEA_hideUntil_display, display)); auxDisplay.setText(activity.getString(R.string.TEA_hideUntil_display, display));
auxDisplay.setTextColor(themeColor); auxDisplay.setTextColor(themeColor);
image.setImageResource(R.drawable.tea_icn_hide);
} }
} }

@ -15,6 +15,7 @@ import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener; import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.CheckBox; import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.Spinner; import android.widget.Spinner;
import android.widget.TextView; import android.widget.TextView;
@ -45,6 +46,9 @@ public class ReminderControlSet extends PopupControlSet {
TextView label = (TextView) getDisplayView().findViewById(R.id.display_row_edit); TextView label = (TextView) getDisplayView().findViewById(R.id.display_row_edit);
label.setText(R.string.TEA_reminders_group_label); label.setText(R.string.TEA_reminders_group_label);
label.setTextColor(unsetColor); label.setTextColor(unsetColor);
ImageView image = (ImageView) getDisplayView().findViewById(R.id.display_row_icon);
image.setImageResource(R.drawable.tea_icn_reminder_gray);
} }
public void addViewToBody(View v) { public void addViewToBody(View v) {

Loading…
Cancel
Save