Code example for ArrayAdapter

Methods: insertremove

0
			Adapter adapter = getAdapter();
			if (adapter != null && adapter instanceof ArrayAdapter) {
				ArrayAdapter<Object> arrayAdapter = (ArrayAdapter<Object>) adapter;
				Object item = adapter.getItem(from);
 
				arrayAdapter.remove(item);
				arrayAdapter.insert(item, to);
			} 
		} 
	} 
 
	public class OnRemoveListenerImpl implements OnRemoveListener { 
		@SuppressWarnings("unchecked") 
		public void remove(int which) {
			if (DEBUG) {
				Log.d(TAG, "RemoveListenerImpl remove event. which=" + which);
			} 
 
			if (which < 0) {
				return; 
			}