Back to project page HydraListAndroid.
The source code is released under:
Apache License
If you think the Android project HydraListAndroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.fada21.android.hydralist.sample; //w w w .j av a 2 s.com import java.util.List; import com.fada21.android.hydralist.data.ListDataProvider; import com.fada21.android.hydralist.dragable.interfaces.Swappable; public class SampleDataProvider extends ListDataProvider<SampleListItem> implements Swappable { public SampleDataProvider(List<SampleListItem> data) { super(data, SampleListItem.class); } @Override public void swap(int indexOne, int indexTwo) { SampleListItem temp = data.get(indexOne); data.set(indexOne, data.get(indexTwo)); data.set(indexTwo, temp); } }