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


Java MovieDetailAdapter類代碼示例

本文整理匯總了Java中com.example.jingbin.cloudreader.adapter.MovieDetailAdapter的典型用法代碼示例。如果您正苦於以下問題:Java MovieDetailAdapter類的具體用法?Java MovieDetailAdapter怎麽用?Java MovieDetailAdapter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


MovieDetailAdapter類屬於com.example.jingbin.cloudreader.adapter包,在下文中一共展示了MovieDetailAdapter類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setAdapter

import com.example.jingbin.cloudreader.adapter.MovieDetailAdapter; //導入依賴的package包/類
/**
 * 設置導演&演員adapter
 */
private void setAdapter(MovieDetailBean movieDetailBean) {
    bindingContentView.xrvCast.setVisibility(View.VISIBLE);
    LinearLayoutManager mLayoutManager = new LinearLayoutManager(OneMovieDetailActivity.this);
    mLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
    bindingContentView.xrvCast.setLayoutManager(mLayoutManager);
    bindingContentView.xrvCast.setPullRefreshEnabled(false);
    bindingContentView.xrvCast.setLoadingMoreEnabled(false);
    // 需加,不然滑動不流暢
    bindingContentView.xrvCast.setNestedScrollingEnabled(false);
    bindingContentView.xrvCast.setHasFixedSize(false);

    MovieDetailAdapter mAdapter = new MovieDetailAdapter();
    mAdapter.addAll(movieDetailBean.getDirectors());
    mAdapter.addAll(movieDetailBean.getCasts());
    bindingContentView.xrvCast.setAdapter(mAdapter);
}
 
開發者ID:joelan,項目名稱:ClouldReader,代碼行數:20,代碼來源:OneMovieDetailActivity.java

示例2: setAdapter

import com.example.jingbin.cloudreader.adapter.MovieDetailAdapter; //導入依賴的package包/類
/**
 * 設置導演&演員adapter
 */
private void setAdapter(MovieDetailBean movieDetailBean) {
    binding.xrvCast.setVisibility(View.VISIBLE);
    LinearLayoutManager mLayoutManager = new LinearLayoutManager(MovieDetailActivity.this);
    mLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
    binding.xrvCast.setLayoutManager(mLayoutManager);
    binding.xrvCast.setPullRefreshEnabled(false);
    binding.xrvCast.setLoadingMoreEnabled(false);
    // 需加,不然滑動不流暢
    binding.xrvCast.setNestedScrollingEnabled(false);
    binding.xrvCast.setHasFixedSize(false);

    MovieDetailAdapter mAdapter = new MovieDetailAdapter();
    mAdapter.addAll(movieDetailBean.getDirectors());
    mAdapter.addAll(movieDetailBean.getCasts());
    binding.xrvCast.setAdapter(mAdapter);
}
 
開發者ID:joelan,項目名稱:ClouldReader,代碼行數:20,代碼來源:MovieDetailActivity.java


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