use of com.example.jingbin.cloudreader.adapter.FilmDetailImageAdapter in project CloudReader by youlookwhat.
the class FilmDetailActivity method setImageAdapter.
/**
* 剧照
*/
private void setImageAdapter(List<String> listBeans) {
bindingContentView.xrvImages.setVisibility(View.VISIBLE);
LinearLayoutManager mLayoutManager = new LinearLayoutManager(FilmDetailActivity.this);
mLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
bindingContentView.xrvImages.setLayoutManager(mLayoutManager);
// 需加,不然滑动不流畅
bindingContentView.xrvImages.setNestedScrollingEnabled(false);
bindingContentView.xrvImages.setHasFixedSize(false);
FilmDetailImageAdapter mAdapter = new FilmDetailImageAdapter(this, listBeans);
mAdapter.addAll(listBeans);
bindingContentView.xrvImages.setAdapter(mAdapter);
bindingContentView.xrvImages.setFocusable(false);
bindingContentView.xrvImages.setFocusableInTouchMode(false);
initRxBus();
}
Aggregations