Search in sources :

Example 1 with UserHomePagerCoinsAdapter

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

the class UserHomePageFragment method setCoins.

private void setCoins() {
    int count = mUserCoinsInfo.getData().getCount();
    if (count == 0) {
        coinsLayout.setVisibility(View.GONE);
    }
    List<UserCoinsInfo.DataBean.ListBean> list = mUserCoinsInfo.getData().getList();
    mCoinsRecycler.setHasFixedSize(false);
    mCoinsRecycler.setNestedScrollingEnabled(false);
    mCoinsRecycler.setLayoutManager(new GridLayoutManager(getActivity(), 2));
    mCoinsRecycler.setAdapter(new UserHomePagerCoinsAdapter(mCoinsRecycler, list));
    mCoinsCount.setText(String.valueOf(count));
}
Also used : GridLayoutManager(android.support.v7.widget.GridLayoutManager) UserCoinsInfo(com.hotbitmapgg.bilibili.entity.user.UserCoinsInfo) UserHomePagerCoinsAdapter(com.hotbitmapgg.bilibili.adapter.UserHomePagerCoinsAdapter) SuppressLint(android.annotation.SuppressLint)

Aggregations

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