Search in sources :

Example 1 with UserHomePagerChaseBangumiAdapter

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

the class UserHomePageFragment method setChaseBangumi.

private void setChaseBangumi() {
    int count = mUserChaseBangumiInfo.getData().getCount();
    if (count == 0) {
        chaseBangumiLayout.setVisibility(View.GONE);
    }
    List<UserChaseBangumiInfo.DataBean.ResultBean> result = mUserChaseBangumiInfo.getData().getResult();
    mChaseBangumiRecycler.setHasFixedSize(false);
    mChaseBangumiRecycler.setNestedScrollingEnabled(false);
    mChaseBangumiRecycler.setLayoutManager(new GridLayoutManager(getActivity(), 3));
    mChaseBangumiRecycler.setAdapter(new UserHomePagerChaseBangumiAdapter(mChaseBangumiRecycler, result));
    mChaseBangumiCount.setText(String.valueOf(count));
}
Also used : GridLayoutManager(android.support.v7.widget.GridLayoutManager) UserChaseBangumiInfo(com.hotbitmapgg.bilibili.entity.user.UserChaseBangumiInfo) UserHomePagerChaseBangumiAdapter(com.hotbitmapgg.bilibili.adapter.UserHomePagerChaseBangumiAdapter) SuppressLint(android.annotation.SuppressLint)

Aggregations

SuppressLint (android.annotation.SuppressLint)1 GridLayoutManager (android.support.v7.widget.GridLayoutManager)1 UserHomePagerChaseBangumiAdapter (com.hotbitmapgg.bilibili.adapter.UserHomePagerChaseBangumiAdapter)1 UserChaseBangumiInfo (com.hotbitmapgg.bilibili.entity.user.UserChaseBangumiInfo)1