ArrayAdapter remove - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ArrayAdapter remove method.

This code example shows how to use the following methods:getItem, insert, remove
        this.headers.add(section);  
        this.sections.put(section, adapter);  
    }   
 
    public void setSectionTitle(int section, String title) {
    	String oldTitle = this.headers.getItem(section);
 
    	// remove/add to headers array 
    	this.headers.remove(oldTitle);
    	this.headers.insert(title, section);
    	 
    	// remove/add to section map 
    	Adapter adapter = this.sections.get(oldTitle);
    	this.sections.remove(oldTitle);
    	this.sections.put(title, adapter);
    } 
     
    public Object getItem(int position) {  
        for(int i = 0; i < headers.getCount(); i++) {
        	String section = headers.getItem(i);
8
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:remove, sort
 
	public void removeSection(String section, Comparator<String> comp) {
		if (headers == null) {
			throw new InvalidParameterException(ERRORMSG);
		} 
		this.headers.remove(section);
		SimpleCursorAdapter prev = this.sections.remove(section);
		if (prev != null) {
			Log.d("listproto", "killing previous adapter");
			prev.unregisterDataSetObserver(subObserver);
			prev.swapCursor(null);
		} 
		// Need to sort the headers each time it changes 
		if (comp != null) {
			headers.sort(comp);
		} 
 
		sectionIds.remove(section);
	} 
 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:insert, remove
        empty = list.isEmpty();
    } 
 
    public void add(String historyItem) {
        // make sure that we do not end up inserting duplicates 
        adapter.remove(historyItem);
        adapter.insert(historyItem, 0);
        empty = false;
    } 
 
    public ArrayAdapter<String> getAdapter() {
        return adapter;
    } 
 
    public List<String> getHistory() {
        return listAdapter;
    } 
 
    public boolean isEmpty() { 
        /* 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getItem, remove
        attributeAdpt.add(attr);
        attributeList.add(attr);
    } 
     
    private String removeAttribute(int pos) {
        String str = attributeAdpt.getItem(pos);
        if (str != null) {
            attributeAdpt.remove(str);
            attributeList.remove(str);
        } 
        return str;
    } 
     
    private void addEnteredAttribute() { 
        Editable e = entry.getText();
         
        String attrStr = e.toString();
     
        if (attrStr.length() == 0)
            return; 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:insert, remove
		// If the completion was already there, remove and re-add it. This way, 
		// it gets moved to the front. 
		int previousLocation = completionOptions.indexOf(s);
		if (previousLocation != -1) {
			completionOptions.remove(previousLocation);
			arrayAdapter.remove(s);
		} 
 
		// Add our completion to the actual active completions database 
		arrayAdapter.insert(s, 0);
 
		// Add our completion to our to-be-persistent storage 
		completionOptions.add(0, s);
 
		Log.d(TAG, "Current completion options: " + completionOptions.toString());
	} 
 
	public void clearCompletionOptions(SharedPreferences settings) {
		completionOptions.clear();
		savePersistentState(settings);
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:remove
		ArrayAdapter<Bookmark> adapter = (ArrayAdapter<Bookmark>) getListAdapter();
 
		Bookmark selectedBookmark = (Bookmark) getListAdapter().getItem(
				(int) id);
		bookmarkDataSource.deleteBookmark(selectedBookmark);
		adapter.remove(selectedBookmark);
 
		return true; 
	} 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:remove
		case 0: 
			ClipboardManager temp = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
			temp.setText(m_adapter.getItem((int) id).getInput());
			return true; 
		case 1: 
			m_adapter.remove(m_adapter.getItem((int) id));
			return true; 
		default: 
			return super.onContextItemSelected(item);
		}	 
	} 
//********************************************************	 
//******************************************************** 
	private class InputOutputAdapter extends ArrayAdapter<InputOutput>
	{ 
	 
		private ArrayList<InputOutput> items;
		 
		public InputOutputAdapter(Context context, int textViewResourceId, ArrayList<InputOutput> info)
		{ 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java

Related ArrayAdapter remove Questions & Answers:

remove Method Overview
Removes the specified object from the array.
See Code Examples for other Android ArrayAdapter Methods: