Code example for List

Methods: add, remove

0
        } 
 
        @Override 
        public void drop(int from, int to) {
            if (from != to) {
                String data = mData.remove(dataPosition(from));
                mData.add(dataPosition(to), data);
                notifyDataSetChanged();
            } 
        } 
 
        @Override 
        public int getCount() { 
            return mData.size() + 1;
        } 
 
        @Override 
        public boolean areAllItemsEnabled() { 
            return false; 
        }