本文整理匯總了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);
}
示例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);
}