android - How can a custom listview communicate back to the fragment? -



android - How can a custom listview communicate back to the fragment? -

i have dynamic list view (gesture based drag & rearrange) based on custom list view devbytes. in fragment set custom list view.

private dynamiclistview mlistview; ...

this list view set values (tasks):

mlistview.setlistvalues(mtasklist);

this mtasklist modified e.g. when task deleted via swipe. happens outside dynamiclistview.

whenever order of tasks changed in dynamiclistview needs communicated fragment. due lack of knowledge/experience don't know how custom dynamiclistview can allow fragment know tasks have swapped positions. dynamiclistview:

private void swapelements(arraylist<tasklineitemobject> arraylist, int indexone, int indextwo) { tasklineitemobject temp = arraylist.get(indexone); arraylist.set(indexone, arraylist.get(indextwo)); arraylist.set(indextwo, temp); // inform fragment on swap }

does have recommendations?

android listview android-fragments android-custom-view

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -