package pl.komunikator.komunikator.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import pl.komunikator.komunikator.R;
import pl.komunikator.komunikator.adapter.ConversationCreatorAdapter;
import pl.komunikator.komunikator.entity.User;

public class CreateConversationActivity extends AppCompatActivity {

    private RecyclerView mRecyclerView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_create_conversation);

        mRecyclerView = (RecyclerView) findViewById(R.id.checkBoxedContactsView);
        RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
        mRecyclerView.setLayoutManager(mLayoutManager);
        mRecyclerView.setItemAnimator(new DefaultItemAnimator());

        ConversationCreatorAdapter adapter = new ConversationCreatorAdapter(User.getLoggedUser().friends);
        mRecyclerView.setAdapter(adapter);
    }
}

@@ -39,16 +39,47 @@
 ivity;%0A%0A
+import android.content.Intent;%0A
 import a
@@ -299,16 +299,72 @@
 lerView;
+%0Aimport android.view.View;%0Aimport android.widget.Button;
 %0A%0Aimport
@@ -620,16 +620,65 @@
 lerView;
+%0A    private ConversationCreatorAdapter mAdapter;
 %0A%0A    @O
@@ -846,24 +846,204 @@
 ersation);%0A%0A
+        initViews();%0A    %7D%0A%0A    private void initViews() %7B%0A        initRecyclerView();%0A        initAdapter();%0A        initButtonBar();%0A    %7D%0A%0A    private void initRecyclerView() %7B%0A
         mRec
@@ -1336,16 +1336,55 @@
 tor());%0A
+    %7D%0A%0A    private void initAdapter() %7B
 %0A       
@@ -1530,12 +1530,677 @@
 r);%0A    
-%7D
+    mAdapter = adapter;%0A    %7D%0A%0A    private void initButtonBar() %7B%0A        View buttonBar = findViewById(R.id.button_bar_contacts);%0A        Button createButton = (Button) buttonBar.findViewById(R.id.createBarButton);%0A        createButton.setOnClickListener(new View.OnClickListener() %7B%0A            @Override%0A            public void onClick(View view) %7B%0A%0A            %7D%0A        %7D);%0A%0A        Button cancelButton = (Button) buttonBar.findViewById(R.id.cancelBarButton);%0A        cancelButton.setOnClickListener(new View.OnClickListener() %7B%0A            @Override%0A            public void onClick(View view) %7B%0A                onBackPressed();%0A            %7D%0A        %7D);%0A    %7D%0A
 %0A%7D%0A

Implement new activity