Search in sources :

Example 1 with AttentionBangumiAdapter

use of com.hotbitmapgg.bilibili.adapter.AttentionBangumiAdapter in project bilibili-android-client by HotBitmapGG.

the class HomeAttentionFragment method createHeadView.

private void createHeadView() {
    View headView = LayoutInflater.from(getActivity()).inflate(R.layout.layout_attention_head_view, mRecyclerView, false);
    RecyclerView mBangumiRecycler = (RecyclerView) headView.findViewById(R.id.focus_head_recycler);
    mBangumiRecycler.setHasFixedSize(false);
    mBangumiRecycler.setNestedScrollingEnabled(false);
    mBangumiRecycler.setLayoutManager(new GridLayoutManager(getActivity(), 3));
    mBangumiRecycler.setAdapter(new AttentionBangumiAdapter(mBangumiRecycler, chaseBangumis));
    mHeaderViewRecyclerAdapter.addHeaderView(headView);
}
Also used : GridLayoutManager(android.support.v7.widget.GridLayoutManager) AttentionBangumiAdapter(com.hotbitmapgg.bilibili.adapter.AttentionBangumiAdapter) RecyclerView(android.support.v7.widget.RecyclerView) CustomEmptyView(com.hotbitmapgg.bilibili.widget.CustomEmptyView) BindView(butterknife.BindView) RecyclerView(android.support.v7.widget.RecyclerView) View(android.view.View)

Aggregations

GridLayoutManager (android.support.v7.widget.GridLayoutManager)1 RecyclerView (android.support.v7.widget.RecyclerView)1 View (android.view.View)1 BindView (butterknife.BindView)1 AttentionBangumiAdapter (com.hotbitmapgg.bilibili.adapter.AttentionBangumiAdapter)1 CustomEmptyView (com.hotbitmapgg.bilibili.widget.CustomEmptyView)1