use of com.hotbitmapgg.bilibili.adapter.LiveAppIndexAdapter in project bilibili-android-client by HotBitmapGG.
the class LiveAppIndexActivity method initRecyclerView.
@Override
public void initRecyclerView() {
mLiveAppIndexAdapter = new LiveAppIndexAdapter(LiveAppIndexActivity.this);
mRecyclerView.setAdapter(mLiveAppIndexAdapter);
GridLayoutManager layout = new GridLayoutManager(LiveAppIndexActivity.this, 12);
layout.setOrientation(LinearLayoutManager.VERTICAL);
layout.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
@Override
public int getSpanSize(int position) {
return mLiveAppIndexAdapter.getSpanSize(position);
}
});
mRecyclerView.setLayoutManager(layout);
}
use of com.hotbitmapgg.bilibili.adapter.LiveAppIndexAdapter in project bilibili-android-client by HotBitmapGG.
the class HomeLiveFragment method initRecyclerView.
@Override
protected void initRecyclerView() {
mLiveAppIndexAdapter = new LiveAppIndexAdapter(getActivity());
mRecyclerView.setAdapter(mLiveAppIndexAdapter);
GridLayoutManager layout = new GridLayoutManager(getActivity(), 12);
layout.setOrientation(LinearLayoutManager.VERTICAL);
layout.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
@Override
public int getSpanSize(int position) {
return mLiveAppIndexAdapter.getSpanSize(position);
}
});
mRecyclerView.setLayoutManager(layout);
}
Aggregations