本文整理汇总了Java中com.example.jingbin.cloudreader.adapter.OneAdapter类的典型用法代码示例。如果您正苦于以下问题:Java OneAdapter类的具体用法?Java OneAdapter怎么用?Java OneAdapter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OneAdapter类属于com.example.jingbin.cloudreader.adapter包,在下文中一共展示了OneAdapter类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initRecyclerView
import com.example.jingbin.cloudreader.adapter.OneAdapter; //导入依赖的package包/类
private void initRecyclerView() {
LinearLayoutManager mLayoutManager = new LinearLayoutManager(getActivity());
mLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
bindingView.listOne.setLayoutManager(mLayoutManager);
// 加上这两行代码,下拉出提示才不会产生出现刷新头的bug,不加拉不下来
bindingView.listOne.setPullRefreshEnabled(false);
bindingView.listOne.clearHeader();
bindingView.listOne.setLoadingMoreEnabled(false);
// 需加,不然滑动不流畅
bindingView.listOne.setNestedScrollingEnabled(false);
bindingView.listOne.setHasFixedSize(false);
HeaderItemOneBinding oneBinding = DataBindingUtil.inflate(getLayoutInflater(), R.layout.header_item_one, null, false);
oneBinding.setView(this);
bindingView.listOne.addHeaderView(oneBinding.getRoot());
oneAdapter = new OneAdapter(activity);
}
示例2: onActivityCreated
import com.example.jingbin.cloudreader.adapter.OneAdapter; //导入依赖的package包/类
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
showContentView();
aCache = ACache.get(getActivity());
oneAdapter = new OneAdapter(activity);
mHotMovieBean = (HotMovieBean) aCache.getAsObject(Constants.ONE_HOT_MOVIE);
isPrepared = true;
DebugUtil.error("---OneFragment --onActivityCreated");
}