use of net.iGap.adapter.RoomListAdapter in project iGap-Android by KianIranian-STDG.
the class MainFragment method initRecyclerView.
private void initRecyclerView(Context context) {
recyclerView = new RecyclerView(context);
recyclerView.setItemAnimator(null);
recyclerView.setItemViewCacheSize(0);
recyclerView.setLayoutManager(layoutManager = new LinearLayoutManager(context));
recyclerView.setAdapter(roomListAdapter = new RoomListAdapter(getRoomController().getLiveRoomList(), avatarHandler, selectedRoom));
LinearLayoutManager layoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();
layoutManager.scrollToPositionWithOffset(firstVisibleItemPosition, firstVisibleItemPositionOffset);
}
Aggregations