本文整理了Java中android.support.v4.content.Loader.getId()
方法的一些代码示例,展示了Loader.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Loader.getId()
方法的具体详情如下:
包路径:android.support.v4.content.Loader
类名称:Loader
方法名:getId
暂无
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor c) {
String[] columns;
switch (loader.getId()) {
case LOADER_NAMES:
columns=COLUMNS_NAMES;
break;
case LOADER_NAMES_NUMBERS:
columns=COLUMNS_NUMBERS;
break;
default:
columns=COLUMNS_EMAILS;
break;
}
adapter.changeCursor(c, columns);
}
代码示例来源:origin: k9mail/k-9
@Override
public void onLoadFinished(Loader<MessageViewInfo> loader, MessageViewInfo messageViewInfo) {
if (loader.getId() != DECODE_MESSAGE_LOADER_ID) {
throw new IllegalStateException("loader id must be message decoder id");
}
onDecodeMessageFinished(messageViewInfo);
}
代码示例来源:origin: k9mail/k-9
@Override
public void onLoadFinished(Loader<LocalMessage> loader, LocalMessage message) {
if (loader.getId() != LOCAL_MESSAGE_LOADER_ID) {
throw new IllegalStateException("loader id must be message loader id");
}
localMessage = message;
if (message == null) {
onLoadMessageFromDatabaseFailed();
} else {
onLoadMessageFromDatabaseFinished();
}
}
代码示例来源:origin: k9mail/k-9
@Override
public void onLoaderReset(Loader<LocalMessage> loader) {
if (loader.getId() != LOCAL_MESSAGE_LOADER_ID) {
throw new IllegalStateException("loader id must be message loader id");
}
// Do nothing
}
};
代码示例来源:origin: k9mail/k-9
@Override
public void onLoaderReset(Loader<MessageViewInfo> loader) {
if (loader.getId() != DECODE_MESSAGE_LOADER_ID) {
throw new IllegalStateException("loader id must be message decoder id");
}
// Do nothing
}
};
代码示例来源:origin: square/assertj-android
public S hasId(int id) {
isNotNull();
int actualId = actual.getId();
assertThat(actualId) //
.overridingErrorMessage("Expected ID <%s> but was <%s>.", id, actualId) //
.isEqualTo(id);
return myself;
}
代码示例来源:origin: k9mail/k-9
@Override
public void onLoaderReset(Loader<List<Recipient>> loader) {
if (loader.getId() == LOADER_ID_FILTERING) {
adapter.setHighlight(null);
adapter.setRecipients(null);
}
}
代码示例来源:origin: k9mail/k-9
@Override
public void onLoadFinished(Loader<List<Recipient>> loader, List<Recipient> data) {
if (loaderManager == null) {
return;
}
switch (loader.getId()) {
case LOADER_ID_FILTERING: {
adapter.setRecipients(data);
break;
}
case LOADER_ID_ALTERNATES: {
postShowAlternatesPopup(data);
loaderManager.destroyLoader(LOADER_ID_ALTERNATES);
break;
}
}
}
代码示例来源:origin: k9mail/k-9
swipeRefreshLayout.setEnabled(isPullToRefreshAllowed());
final int loaderId = loader.getId();
cursors[loaderId] = data;
cursorValid[loaderId] = true;
代码示例来源:origin: AppLozic/Applozic-Android-SDK
@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);
}
}
代码示例来源:origin: AppLozic/Applozic-Android-SDK
@Override
public void onLoaderReset(Loader<Cursor> loader) {
if (loader.getId() == 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);
}
}
代码示例来源:origin: Solartisan/TurboRecyclerViewHelper
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
switch (loader.getId()) {
case LOADER_ID:
mCursorAdapter.swapCursor(data);
break;
}
}
代码示例来源:origin: Solartisan/TurboRecyclerViewHelper
@Override
public void onLoaderReset(Loader<Cursor> loader) {
switch (loader.getId()) {
case LOADER_ID:
mCursorAdapter.swapCursor(null);
break;
}
}
}
代码示例来源:origin: AppLozic/Applozic-Android-SDK
@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);
}
}
代码示例来源:origin: AppLozic/Applozic-Android-SDK
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
// This swaps the new cursor into the adapter.
if (loader.getId() == QUERY_ID) {
mAdapter.swapCursor(data);
}
}
代码示例来源:origin: AppLozic/Applozic-Android-SDK
@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);
}
}
代码示例来源:origin: AppLozic/Applozic-Android-SDK
@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);
}
}
代码示例来源:origin: AppLozic/Applozic-Android-SDK
@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);
}
}
代码示例来源:origin: AppLozic/Applozic-Android-SDK
@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);
}
}
代码示例来源:origin: SMSTicket/sms-ticket
@Override
public void onLoadFinished(Loader<Object> loader, Object data) {
if (!isAdded()) {
return;
}
if (loader.getId() == Constants.LOADER_CITIES) {
mAdapter = new CitiesAdapter(c, (List<CitiesAdapter.Item>)data);
vList.setAdapter(mAdapter);
}
}
内容来源于网络,如有侵权,请联系作者删除!