Search in sources :

Example 1 with RoomUserAdapter

use of chat.rocket.android.layouthelper.chatroom.dialog.RoomUserAdapter in project Rocket.Chat.Android by RocketChat.

the class UsersOfRoomDialogFragment method setupView.

private void setupView(Optional<RocketChatAbsoluteUrl> rocketChatAbsoluteUrlOptional) {
    compositeDisposable.clear();
    if (!rocketChatAbsoluteUrlOptional.isPresent()) {
        return;
    }
    RecyclerView recyclerView = (RecyclerView) getDialog().findViewById(R.id.recyclerview);
    recyclerView.setLayoutManager(new GridLayoutManager(getContext(), 2));
    recyclerView.setAdapter(new RoomUserAdapter(getContext(), realmHelper, rocketChatAbsoluteUrlOptional.get()));
}
Also used : GridLayoutManager(android.support.v7.widget.GridLayoutManager) RoomUserAdapter(chat.rocket.android.layouthelper.chatroom.dialog.RoomUserAdapter) RecyclerView(android.support.v7.widget.RecyclerView)

Aggregations

GridLayoutManager (android.support.v7.widget.GridLayoutManager)1 RecyclerView (android.support.v7.widget.RecyclerView)1 RoomUserAdapter (chat.rocket.android.layouthelper.chatroom.dialog.RoomUserAdapter)1