简体   繁体   中英

How to add on change listener to a list (not list view)

How can i add a on change listener to my list (not list view)?

for example i need some Thing like:

List<c> C;
C_SQLiteData data;

.
.
.
.
C = data.findall();
C.addonchangelistener(new onchangelistener){
            @Override
            public void onChange(View arg0) {
                refreshlistview(view);
            }
        });
}

you can use intent to refresh the list after performing changes like this

Dochanges();
Intent refresh=new Intent("com.example.Project.Same_activity");
startActivity(refresh);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM