Simply implementing a long-click listener for each of the items in each group should work. Make use of the OnAddClickListener (which needs renaming) to delegate the deleting functionality (in a new method that needs to be created) to the parent fragment (ServiceProviderAvailabilitiesFragment in this case). This should retrieve the current profile from the database, delete the appropriate availability (passed in from the adapter) and then saved back to the database.
Simply implementing a long-click listener for each of the items in each group should work. Make use of the
OnAddClickListener
(which needs renaming) to delegate the deleting functionality (in a new method that needs to be created) to the parent fragment (ServiceProviderAvailabilitiesFragment
in this case). This should retrieve the current profile from the database, delete the appropriate availability (passed in from the adapter) and then saved back to the database.