android - Listview and array adapter and remove -



android - Listview and array adapter and remove -

i created adapter

public class myarrayadapter extends arrayadapter<watch>

overriding

public myarrayadapter(context context, list<watch> values){ super(context, android.r.layout.simple_list_item_1, values); this.context = context; }

and

private view createoneview(){ ... }

then do

myarrayadapter myadapter = new myarrayadapter(this, getallwatches()); ... //do stuff here myadapter.remove(getallwatches().get(2)); myadapter.notifydatasetchanged();

the watch still not removed. suspect objects removed if ther == , not .equal(), or missing more trivial?

myadapter.getposition(getallwatches().get(2)) homecoming -1, problem object not found. arrayadapater uses indeed .equals() method. implementing in appropriate way (comparingfields) works smoothly.

android listview

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -