Introduction - If you have any usage issues, please Google them yourself
DragListView
package com.tarena.draglist.demo
import java.util.List
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.BaseAdapter
import android.widget.TextView
public class DragListAdapter extends BaseAdapter {
Context context
LayoutInflater inflater
List<String> groupN
public DragListAdapter(Context con, List<String>groupname) {
this.groupN = groupname
this.context = con
inflater = LayoutInflater.from(con)
}
@Override
public int getCount() {
return groupN.size()
}
@Override
public Object getItem(int position) {
return groupN.get(position)
}
public void remove(String group) {
int index=groupN.indexOf(group)
groupN.remove(index)
notifyDataSetChanged()
}
public void insert(String grname, int postion) {
groupN.add(postion, grname)
notifyDataSetChanged()
}
@Override