В действительности он ищет значки уведомлений в папке для рисования с именем ic_stat_ic_notification и значения цвета в папке ресурсов Android. Вы должны создать их. Если вы хотите использовать default, просто удалите их из Android-манифеста.
I think the easiest way is to start by writing an extension method which find's duplicates in a list of objects. Since you're objects use .Equals() they can be compared in most common collections.
public static IEnumerable<T> FindDuplicates<T>(this IEnumerable<T> enumerable) {
var hashset = new HashSet<T>();
foreach ( var cur in enumerable ) {
if ( !hashset.Add(cur) ) {
yield return cur;
}
}
}
Now it should be pretty easy to update your collection for duplicates. For instance
List<SomeType> list = GetTheList();
list
.FindDuplicates()
.ToList()
.ForEach(x => x.State = "DUPLICATE");
If you already have a ForEach extentsion method defined in your code, you can avoid the .ToList.
Your objects have some sort of state property. You're presumably finding duplicates based on another property or set of properties. Why not:
List<obj> keys = new List<object>();
foreach (MyObject obj in myList)
{
if (keys.Contains(obj.keyProperty))
obj.state = "something indicating a duplicate here";
else
keys.add(obj.keyProperty)
}
IEnumerable<T> oldList;
IEnumerable<T> list;
foreach (var n in oldList.Intersect(list))
n.State = "Duplicate";
Edit: I need to lrn2read. this code is for 2 lists. My bad.