@Override public void onClick(DialogInterface dialogInterface, int i) { blockUserProcess(contact, false); } });
public void onClick(View v) { openInvite(); } });
static public void enqueueWork(Context context, Intent work) { enqueueWork(context, DeviceContactSyncService.class, JOB_ID, work); }
@Override public void onSuccess(String[] userIdArray, Context context) { if (isAdded()) { groupContacts = new String[userIdArray.length]; groupContacts = userIdArray; getLoaderManager().initLoader(ContactsQuery.QUERY_ID, null, ContactSelectionFragment.this); } }
@Override public void onSuccess(String[] userIdArrays, Context context) { if (isAdded()) { userIdArray = new String[userIdArrays.length]; userIdArray = userIdArrays; getLoaderManager().initLoader(ContactSelectionFragment.ContactsQuery.QUERY_ID, null, AppContactFragment.this); } }
/** * Defines the SectionIndexer.getSectionForPosition() interface. */ @Override public int getSectionForPosition(int i) { if (getCursor() == null) { return 0; } return mAlphabetIndexer.getSectionForPosition(i); }
/** * Defines the SectionIndexer.getSectionForPosition() interface. */ @Override public int getSectionForPosition(int i) { if (getCursor() == null) { return 0; } return mAlphabetIndexer.getSectionForPosition(i); }
@Override public void onLoaderReset(Loader<Cursor> loader) { if (loader.getId() == ContactsQuery.QUERY_ID) { // When the loader is being reset, clear the cursor from the adapter. This allows the // cursor resources to be freed. mAdapter.swapCursor(null); } }
@Override public void onLoadFinished(Loader<Cursor> loader, Cursor data) { // This swaps the new cursor into the adapter. if (loader.getId() == ContactsQuery.QUERY_ID) { mAdapter.swapCursor(data); } }
public void restartLoader() { if (getLoaderManager() != null) { getLoaderManager().restartLoader( ContactsQuery.QUERY_ID, null, AppContactFragment.this); } }
public void restartLoader() { if (getLoaderManager() != null) { getLoaderManager().restartLoader( ContactSelectionFragment.ContactsQuery.QUERY_ID, null, ContactSelectionFragment.this); } }
@Override public void onSuccess(List<Contact> contacts, Context context) { if (dialog != null) { dialog.dismiss(); } if (!contacts.isEmpty() && appContactFragment != null) { appContactFragment.restartLoader(); } }
@Override public void onDestroy() { super.onDestroy(); if (refreshContactsScreenBroadcast != null) { LocalBroadcastManager.getInstance(getActivity()).unregisterReceiver(refreshContactsScreenBroadcast); } }
/** * An override of getCount that simplifies accessing the Cursor. If the Cursor is null, * getCount returns zero. As a result, no test for Cursor == null is needed. */ @Override public int getCount() { if (getCursor() == null) { return 0; } return super.getCount(); }
/** * An override of getCount that simplifies accessing the Cursor. If the Cursor is null, * getCount returns zero. As a result, no test for Cursor == null is needed. */ @Override public int getCount() { if (getCursor() == null) { return 0; } return super.getCount(); }
@Override public void onLoadFinished(Loader<Cursor> loader, Cursor data) { // This swaps the new cursor into the adapter. if (loader.getId() == ContactsQuery.QUERY_ID) { mAdapter.swapCursor(data); } }
@Override public void onLoaderReset(Loader<Cursor> loader) { if (loader.getId() == ContactsQuery.QUERY_ID) { // When the loader is being reset, clear the cursor from the adapter. This allows the // cursor resources to be freed. mAdapter.swapCursor(null); } }
@Override public void onSuccess(ApiResponse apiResponse) { getLoaderManager().restartLoader( ContactsQuery.QUERY_ID, null, AppContactFragment.this); }
/** * Defines the SectionIndexer.getPositionForSection() interface. */ @Override public int getPositionForSection(int i) { if (getCursor() == null) { return 0; } return mAlphabetIndexer.getPositionForSection(i); }
/** * Defines the SectionIndexer.getPositionForSection() interface. */ @Override public int getPositionForSection(int i) { if (getCursor() == null) { return 0; } return mAlphabetIndexer.getPositionForSection(i); }