當前位置: 首頁>>代碼示例>>Java>>正文


Java ListRow.getAdapter方法代碼示例

本文整理匯總了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();
            }
        }
    }
}
 
開發者ID:trevd,項目名稱:android_packages_apps_tv,代碼行數:23,代碼來源:SeriesRecordingDetailsFragment.java

示例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);
        }
    }
}
 
開發者ID:nextux,項目名稱:sbs-android-tv,代碼行數:15,代碼來源:MainFragment.java

示例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);
}
 
開發者ID:emmby,項目名稱:easy-a,代碼行數:10,代碼來源:MainFragment.java

示例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);
}
 
開發者ID:emmby,項目名稱:easy-a,代碼行數:14,代碼來源:MainFragment.java

示例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());
        }
    }
}
 
開發者ID:jerrellmardis,項目名稱:Amphitheatre,代碼行數:11,代碼來源:BrowseFragment.java

示例6: getOrCreateSeasonRowAdapter

import android.support.v17.leanback.widget.ListRow; //導入方法依賴的package包/類
private SeasonRowAdapter getOrCreateSeasonRowAdapter(String seasonNumber) {
    ListRow row = getSeasonRow(seasonNumber, true);
    return (SeasonRowAdapter) row.getAdapter();
}
 
開發者ID:trevd,項目名稱:android_packages_apps_tv,代碼行數:5,代碼來源:SeriesRecordingDetailsFragment.java


注:本文中的android.support.v17.leanback.widget.ListRow.getAdapter方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。