public class RecipientAlternatesAdapter extends CursorAdapter
Modifier and Type | Class and Description |
---|---|
static interface |
RecipientAlternatesAdapter.RecipientMatchCallback |
Modifier and Type | Field and Description |
---|---|
static int |
MAX_LOOKUPS |
static int |
QUERY_TYPE_EMAIL |
static int |
QUERY_TYPE_PHONE |
FLAG_AUTO_REQUERY, FLAG_REGISTER_CONTENT_OBSERVER, mAutoRequery, mChangeObserver, mContext, mCursor, mCursorFilter, mDataSetObserver, mDataValid, mDropDownContext, mFilterQueryProvider, mRowIDColumn
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
Constructor and Description |
---|
RecipientAlternatesAdapter(Context context,
long contactId,
Long directoryId,
String lookupKey,
long currentId,
int queryMode,
com.android.ex.chips.RecipientAlternatesAdapter.OnCheckedItemChangedListener listener,
DropdownChipLayouter dropdownChipLayouter,
ChipsUtil.PermissionsCheckListener permissionsCheckListener) |
RecipientAlternatesAdapter(Context context,
long contactId,
Long directoryId,
String lookupKey,
long currentId,
int queryMode,
com.android.ex.chips.RecipientAlternatesAdapter.OnCheckedItemChangedListener listener,
DropdownChipLayouter dropdownChipLayouter,
StateListDrawable deleteDrawable,
ChipsUtil.PermissionsCheckListener permissionsCheckListener) |
Modifier and Type | Method and Description |
---|---|
void |
bindView(View view,
Context context,
Cursor cursor)
Bind an existing view to the data pointed to by cursor
|
long |
getItemId(int position)
Get the row id associated with the specified position in the list.
|
static void |
getMatchingRecipients(Context context,
BaseRecipientAdapter adapter,
ArrayList<String> inAddresses,
Account account,
RecipientAlternatesAdapter.RecipientMatchCallback callback,
ChipsUtil.PermissionsCheckListener permissionsCheckListener) |
static void |
getMatchingRecipients(Context context,
BaseRecipientAdapter adapter,
ArrayList<String> inAddresses,
int addressType,
Account account,
RecipientAlternatesAdapter.RecipientMatchCallback callback,
ChipsUtil.PermissionsCheckListener permissionsCheckListener)
Get a HashMap of address to RecipientEntry that contains all contact
information for a contact with the provided address, if one exists.
|
static void |
getMatchingRecipientsFromDirectoryQueries(Context context,
Map<String,RecipientEntry> recipientEntries,
Set<String> addresses,
Account account,
Set<String> matchesNotFound,
RecipientAlternatesAdapter.RecipientMatchCallback callback,
ChipsUtil.PermissionsCheckListener permissionsCheckListener) |
static void |
getMatchingRecipientsFromExtensionMatcher(BaseRecipientAdapter adapter,
Set<String> matchesNotFound,
RecipientAlternatesAdapter.RecipientMatchCallback callback) |
RecipientEntry |
getRecipientEntry(int position) |
View |
getView(int position,
View convertView,
ViewGroup parent)
Get a View that displays the data at the specified position in the data set.
|
View |
newView(Context context,
Cursor cursor,
ViewGroup parent)
Makes a new view to hold the data pointed to by cursor.
|
changeCursor, convertToString, getCount, getCursor, getDropDownView, getDropDownViewTheme, getFilter, getFilterQueryProvider, getItem, hasStableIds, init, newDropDownView, onContentChanged, runQueryOnBackgroundThread, setDropDownViewTheme, setFilterQueryProvider, swapCursor
areAllItemsEnabled, getItemViewType, getViewTypeCount, isEmpty, isEnabled, notifyDataSetChanged, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserver
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getItemViewType, getViewTypeCount, isEmpty, registerDataSetObserver, unregisterDataSetObserver
public static final int MAX_LOOKUPS
public static final int QUERY_TYPE_EMAIL
public static final int QUERY_TYPE_PHONE
public RecipientAlternatesAdapter(Context context, long contactId, Long directoryId, String lookupKey, long currentId, int queryMode, com.android.ex.chips.RecipientAlternatesAdapter.OnCheckedItemChangedListener listener, DropdownChipLayouter dropdownChipLayouter, ChipsUtil.PermissionsCheckListener permissionsCheckListener)
public RecipientAlternatesAdapter(Context context, long contactId, Long directoryId, String lookupKey, long currentId, int queryMode, com.android.ex.chips.RecipientAlternatesAdapter.OnCheckedItemChangedListener listener, DropdownChipLayouter dropdownChipLayouter, StateListDrawable deleteDrawable, ChipsUtil.PermissionsCheckListener permissionsCheckListener)
public static void getMatchingRecipients(Context context, BaseRecipientAdapter adapter, ArrayList<String> inAddresses, Account account, RecipientAlternatesAdapter.RecipientMatchCallback callback, ChipsUtil.PermissionsCheckListener permissionsCheckListener)
public static void getMatchingRecipients(Context context, BaseRecipientAdapter adapter, ArrayList<String> inAddresses, int addressType, Account account, RecipientAlternatesAdapter.RecipientMatchCallback callback, ChipsUtil.PermissionsCheckListener permissionsCheckListener)
context
- Context.inAddresses
- Array of addresses on which to perform the lookup.callback
- RecipientMatchCallback called when a match or matches are found.public static void getMatchingRecipientsFromDirectoryQueries(Context context, Map<String,RecipientEntry> recipientEntries, Set<String> addresses, Account account, Set<String> matchesNotFound, RecipientAlternatesAdapter.RecipientMatchCallback callback, ChipsUtil.PermissionsCheckListener permissionsCheckListener)
public static void getMatchingRecipientsFromExtensionMatcher(BaseRecipientAdapter adapter, Set<String> matchesNotFound, RecipientAlternatesAdapter.RecipientMatchCallback callback)
public long getItemId(int position)
Adapter
getItemId
in interface Adapter
getItemId
in class CursorAdapter
position
- The position of the item within the adapter's data set whose row id we want.Adapter.getItemId(int)
public RecipientEntry getRecipientEntry(int position)
public View getView(int position, View convertView, ViewGroup parent)
Adapter
LayoutInflater.inflate(int, android.view.ViewGroup, boolean)
to specify a root view and to prevent attachment to the root.getView
in interface Adapter
getView
in class CursorAdapter
position
- The position of the item within the adapter's data set of the item whose view
we want.convertView
- The old view to reuse, if possible. Note: You should check that this view
is non-null and of an appropriate type before using. If it is not possible to convert
this view to display the correct data, this method can create a new view.
Heterogeneous lists can specify their number of view types, so that this View is
always of the right type (see Adapter.getViewTypeCount()
and
Adapter.getItemViewType(int)
).parent
- The parent that this view will eventually be attached toAdapter.getView(int, View, ViewGroup)
public void bindView(View view, Context context, Cursor cursor)
CursorAdapter
bindView
in class CursorAdapter
view
- Existing view, returned earlier by newViewcontext
- Interface to application's global informationcursor
- The cursor from which to get the data. The cursor is already
moved to the correct position.public View newView(Context context, Cursor cursor, ViewGroup parent)
CursorAdapter
newView
in class CursorAdapter
context
- Interface to application's global informationcursor
- The cursor from which to get the data. The cursor is already
moved to the correct position.parent
- The parent to which the new view is attached to