-
- All Implemented Interfaces:
-
android.widget.Adapter,android.widget.Filterable,android.widget.ListAdapter,android.widget.SpinnerAdapter
public class CodeViewAdapter extends BaseAdapter implements Filterable
Custom base adapter that to use it in CodeView auto complete and snippets feature
CodeViewAdapter supports to take a list of code which can include Keywords and snippets
-
-
Constructor Summary
Constructors Constructor Description CodeViewAdapter(Context context, int resource, int textViewResourceId, List<Code> codes)
-
Method Summary
Modifier and Type Method Description ViewgetView(int position, View convertView, ViewGroup parent)intgetCount()ObjectgetItem(int position)longgetItemId(int position)voidupdateCodes(List<Code> newCodeList)Update the current code list with new list voidclearCodes()Clear the current code list and notify data set changed FiltergetFilter()-
Methods inherited from class android.widget.BaseAdapter
areAllItemsEnabled, getAutofillOptions, getDropDownView, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetChanged, notifyDataSetInvalidated, registerDataSetObserver, setAutofillOptions, unregisterDataSetObserver -
Methods inherited from class android.widget.Adapter
getCount, getItem, getItemId, getView -
Methods inherited from class android.widget.Filterable
getFilter -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getCount
int getCount()
-
getItemId
long getItemId(int position)
-
updateCodes
void updateCodes(List<Code> newCodeList)
Update the current code list with new list
- Parameters:
newCodeList- The new code list
-
clearCodes
void clearCodes()
Clear the current code list and notify data set changed
-
-
-
-