Added icons for several control sets

pull/14/head
Sam Bosley 12 years ago
parent 4356180d54
commit 41a2b5541e

@ -34,6 +34,7 @@ import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.CheckedTextView; import android.widget.CheckedTextView;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView; import android.widget.ListView;
import android.widget.TextView; import android.widget.TextView;
@ -140,6 +141,8 @@ public class EditPeopleControlSet extends PopupControlSet {
assignedClear = getView().findViewById(R.id.assigned_clear); assignedClear = getView().findViewById(R.id.assigned_clear);
assignedDisplay = (TextView) getDisplayView().findViewById(R.id.display_row_edit); assignedDisplay = (TextView) getDisplayView().findViewById(R.id.display_row_edit);
ImageView image = (ImageView) getDisplayView().findViewById(R.id.display_row_icon);
image.setImageResource(R.drawable.tea_icn_assign);
setUpListeners(); setUpListeners();
} }
@ -803,6 +806,7 @@ public class EditPeopleControlSet extends PopupControlSet {
user = (AssignedToUser) assignedList.getAdapter().getItem(0); user = (AssignedToUser) assignedList.getAdapter().getItem(0);
displayString = activity.getString(R.string.TEA_assigned_to, user.toString()); displayString = activity.getString(R.string.TEA_assigned_to, user.toString());
} }
assignedDisplay.setText(displayString); assignedDisplay.setText(displayString);
} }

@ -21,6 +21,7 @@ import android.view.inputmethod.EditorInfo;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView; import android.widget.AutoCompleteTextView;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.ListView; import android.widget.ListView;
import android.widget.TextView; import android.widget.TextView;
@ -56,6 +57,7 @@ public final class TagsControlSet extends PopupControlSet {
private ListView selectedTags; private ListView selectedTags;
private boolean populated = false; private boolean populated = false;
private HashMap<String, Integer> tagIndices; private HashMap<String, Integer> tagIndices;
private final ImageView image;
//private final LinearLayout tagsContainer; //private final LinearLayout tagsContainer;
private final TextView tagsDisplay; private final TextView tagsDisplay;
@ -64,6 +66,7 @@ public final class TagsControlSet extends PopupControlSet {
super(activity, viewLayout, displayViewLayout, title); super(activity, viewLayout, displayViewLayout, title);
DependencyInjectionService.getInstance().inject(this); DependencyInjectionService.getInstance().inject(this);
tagsDisplay = (TextView) getDisplayView().findViewById(R.id.display_row_edit); tagsDisplay = (TextView) getDisplayView().findViewById(R.id.display_row_edit);
image = (ImageView) getDisplayView().findViewById(R.id.display_row_icon);
} }
private Tag[] getTagArray() { private Tag[] getTagArray() {
@ -308,9 +311,11 @@ public final class TagsControlSet extends PopupControlSet {
if (!TextUtils.isEmpty(tagString)) { if (!TextUtils.isEmpty(tagString)) {
tagsDisplay.setText(tagString); tagsDisplay.setText(tagString);
tagsDisplay.setTextColor(themeColor); tagsDisplay.setTextColor(themeColor);
image.setImageResource(R.drawable.tea_icn_lists);
} else { } else {
tagsDisplay.setText(R.string.tag_FEx_untagged); tagsDisplay.setText(R.string.tag_FEx_untagged);
tagsDisplay.setTextColor(unsetColor); tagsDisplay.setTextColor(unsetColor);
image.setImageResource(R.drawable.tea_icn_lists_gray);
} }
} }

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: 3.2 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.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

@ -18,10 +18,11 @@
android:paddingLeft="10dip" android:paddingLeft="10dip"
android:paddingRight="10dip" android:paddingRight="10dip"
android:gravity="center_vertical"> android:gravity="center_vertical">
<View 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"/> android:background="#ff0000"/>
<TextView <TextView
android:id="@+id/display_row_edit" android:id="@+id/display_row_edit"

@ -18,10 +18,11 @@
android:paddingRight="10dip" android:paddingRight="10dip"
android:gravity="center_vertical"> android:gravity="center_vertical">
<View 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"/> android:background="#ff0000"/>
<TextView <TextView
android:id="@+id/display_row_edit" android:id="@+id/display_row_edit"

@ -20,10 +20,11 @@
android:paddingLeft="10dip" android:paddingLeft="10dip"
android:paddingRight="10dip" android:paddingRight="10dip"
android:layout_height="50dip"> android:layout_height="50dip">
<View android:id="@+id/display_row_icon" <ImageView android:id="@+id/display_row_icon"
android:layout_width="20dip" android:layout_width="20dip"
android:layout_height="20dip" android:layout_height="20dip"
android:background="#ff0000"/> android:scaleType="fitCenter"
android:src="@drawable/tea_icn_priority_gray"/>
</LinearLayout> </LinearLayout>
<View <View

@ -20,11 +20,11 @@
android:orientation="horizontal" android:orientation="horizontal"
android:paddingLeft="10dip" android:paddingLeft="10dip"
android:paddingRight="10dip" > android:paddingRight="10dip" >
<View 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:background="#ff0000"/> android:scaleType="fitCenter"/>
<TextView <TextView
android:id="@+id/display_row_edit" android:id="@+id/display_row_edit"
style="@style/TextAppearance.EditRowDisplay" style="@style/TextAppearance.EditRowDisplay"

@ -14,6 +14,7 @@ import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams; import android.view.ViewGroup.LayoutParams;
import android.widget.Button; import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
@ -28,12 +29,14 @@ public class DeadlineControlSet extends PopupControlSet {
private DateAndTimePicker dateAndTimePicker; private DateAndTimePicker dateAndTimePicker;
private final View[] extraViews; private final View[] extraViews;
private final RepeatControlSet repeatControlSet; private final RepeatControlSet repeatControlSet;
private final ImageView image;
public DeadlineControlSet(Activity activity, int viewLayout, int displayViewLayout, public DeadlineControlSet(Activity activity, int viewLayout, int displayViewLayout,
RepeatControlSet repeatControlSet, View...extraViews) { RepeatControlSet repeatControlSet, View...extraViews) {
super(activity, viewLayout, displayViewLayout, 0); super(activity, viewLayout, displayViewLayout, 0);
this.extraViews = extraViews; this.extraViews = extraViews;
this.repeatControlSet = repeatControlSet; this.repeatControlSet = repeatControlSet;
this.image = (ImageView) getDisplayView().findViewById(R.id.display_row_icon);
} }
@Override @Override

@ -13,6 +13,7 @@ import android.text.util.Linkify;
import android.view.WindowManager; import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import com.timsu.astrid.R; import com.timsu.astrid.R;
@ -22,9 +23,11 @@ public class EditNotesControlSet extends PopupControlSet {
protected EditText editText; protected EditText editText;
protected TextView notesPreview; protected TextView notesPreview;
protected ImageView image;
public EditNotesControlSet(Activity activity, int viewLayout, int displayViewLayout) { public EditNotesControlSet(Activity activity, int viewLayout, int displayViewLayout) {
super(activity, viewLayout, displayViewLayout, R.string.TEA_note_label); super(activity, viewLayout, displayViewLayout, R.string.TEA_note_label);
image = (ImageView) getDisplayView().findViewById(R.id.display_row_icon);
} }
@Override @Override
@ -38,9 +41,11 @@ public class EditNotesControlSet extends PopupControlSet {
if (TextUtils.isEmpty(textToUse)) { if (TextUtils.isEmpty(textToUse)) {
notesPreview.setText(R.string.TEA_notes_empty); notesPreview.setText(R.string.TEA_notes_empty);
notesPreview.setTextColor(unsetColor); notesPreview.setTextColor(unsetColor);
image.setImageResource(R.drawable.tea_icn_edit_gray);
} else { } else {
notesPreview.setText(textToUse); notesPreview.setText(textToUse);
notesPreview.setTextColor(themeColor); notesPreview.setTextColor(themeColor);
image.setImageResource(R.drawable.tea_icn_edit);
} }
linkifyDisplayView(); linkifyDisplayView();

Loading…
Cancel
Save