本文整理匯總了Java中android.support.v17.leanback.widget.ListRow.getAdapter方法的典型用法代碼示例。如果您正苦於以下問題:Java ListRow.getAdapter方法的具體用法?Java ListRow.getAdapter怎麽用?Java ListRow.getAdapter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.support.v17.leanback.widget.ListRow
的用法示例。
在下文中一共展示了ListRow.getAdapter方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onRecordedProgramsRemoved
import android.support.v17.leanback.widget.ListRow; //導入方法依賴的package包/類
@Override
public void onRecordedProgramsRemoved(RecordedProgram... recordedPrograms) {
for (RecordedProgram recordedProgram : recordedPrograms) {
if (TextUtils.equals(recordedProgram.getSeriesId(), mSeries.getSeriesId())) {
ListRow row = getSeasonRow(recordedProgram.getSeasonNumber(), false);
if (row != null) {
SeasonRowAdapter adapter = (SeasonRowAdapter) row.getAdapter();
adapter.remove(recordedProgram);
if (adapter.isEmpty()) {
getRowsAdapter().remove(row);
if (getRowsAdapter().size() == 1) {
// No season rows left. Only DetailsOverviewRow
mActionsAdapter.clear(ACTION_DELETE);
}
}
}
if (recordedProgram.getId() == mRecommendRecordedProgram.getId()) {
updateWatchAction();
}
}
}
}
示例2: updateRecentlyPlayed
import android.support.v17.leanback.widget.ListRow; //導入方法依賴的package包/類
private void updateRecentlyPlayed() {
ArrayObjectAdapter adapter = (ArrayObjectAdapter) getAdapter();
if (adapter != null) {
ListRow row = (ListRow) adapter.get(0);
if (ContentManagerBase.RECENTLY_PLAYED.equals(row.getHeaderItem().getName())) {
Log.d(TAG, "Update recently played");
BaseArrayAdapter<EpisodeBaseModel> items = (BaseArrayAdapter<EpisodeBaseModel>) row.getAdapter();
List<EpisodeBaseModel> recent = getContentManger().getRecentlyPlayed();
items.replaceItems(recent);
} else {
updateRows(adapter);
}
}
}
示例3: onLoadFinished
import android.support.v17.leanback.widget.ListRow; //導入方法依賴的package包/類
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
int id = loader.getId();
ObjectAdapter adapter = getAdapter();
ListRow row = (ListRow) adapter.get(id);
CursorObjectAdapter rowAdapter = (CursorObjectAdapter) row
.getAdapter();
rowAdapter.swapCursor(cursor);
}
示例4: onLoaderReset
import android.support.v17.leanback.widget.ListRow; //導入方法依賴的package包/類
@Override
public void onLoaderReset(Loader<Cursor> loader) {
// This is called when the last Cursor provided to
// onLoadFinished()
// above is about to be closed. We need to make sure we are no
// longer using it.
int id = loader.getId();
ObjectAdapter adapter = getAdapter();
ListRow row = (ListRow) adapter.get(id);
CursorObjectAdapter rowAdapter = (CursorObjectAdapter) row
.getAdapter();
rowAdapter.swapCursor(null);
}
示例5: reloadAdapters
import android.support.v17.leanback.widget.ListRow; //導入方法依賴的package包/類
private void reloadAdapters() {
for (int i = 0; i < mAdapter.size(); i++) {
ListRow listRow = (ListRow) mAdapter.get(i);
ObjectAdapter objectAdapter = listRow.getAdapter();
if (objectAdapter instanceof ArrayObjectAdapter) {
ArrayObjectAdapter arrayObjectAdapter = ((ArrayObjectAdapter) objectAdapter);
arrayObjectAdapter.notifyArrayItemRangeChanged(0, arrayObjectAdapter.size());
}
}
}
示例6: getOrCreateSeasonRowAdapter
import android.support.v17.leanback.widget.ListRow; //導入方法依賴的package包/類
private SeasonRowAdapter getOrCreateSeasonRowAdapter(String seasonNumber) {
ListRow row = getSeasonRow(seasonNumber, true);
return (SeasonRowAdapter) row.getAdapter();
}