package com.nbusy.app;

import android.os.Bundle;
import android.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

/**
 * A fragment representing a single Chat detail screen.
 * This fragment is either contained in a {@link ChatListActivity}
 * in two-pane mode (on tablets) or a {@link ChatDetailActivity}
 * on handsets.
 */
public class ChatDetailFragment extends Fragment {
    /**
     * The fragment argument representing the item ID that this fragment
     * represents.
     */
    public static final String ARG_ITEM_ID = "item_id";

    /**
     * The dummy content this fragment is presenting.
     */
    private Chats.Chat mItem;

    /**
     * Mandatory empty constructor for the fragment manager to instantiate the
     * fragment (e.g. upon screen orientation changes).
     */
    public ChatDetailFragment() {
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        if (getArguments().containsKey(ARG_ITEM_ID)) {
            // Load the dummy content specified by the fragment
            // arguments. In a real-world scenario, use a Loader
            // to load content from a content provider.
            mItem = Chats.ITEM_MAP.get(getArguments().getString(ARG_ITEM_ID));
        }
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_chat_detail, container, false);

        // Show the dummy content as text in a TextView.
        if (mItem != null) {
            ((TextView) rootView.findViewById(R.id.chat_detail)).setText(mItem.message);
        }

        return rootView;
    }
}

@@ -198,16 +198,68 @@
 tView;%0A%0A
+import java.util.ArrayList;%0Aimport java.util.List;%0A%0A
 /**%0A * A
@@ -764,24 +764,30 @@
 ate 
-Chats.Chat mItem
+List%3CMessage%3E messages
 ;%0A%0A 
@@ -1347,71 +1347,223 @@
    m
-Item = Chats.ITEM_MAP.get(getArguments().getString(ARG_ITEM_ID)
+essages = new ArrayList%3C%3E();%0A            Message m = new Message();%0A            m.from = %22Teoman Soygul%22;%0A            m.message = %22Lorem ip sum my message...%22;%0A            m.sent = %228:50%22;%0A            messages.add(m
 );%0A 
@@ -1887,20 +1887,23 @@
    if (m
-Item
+essages
  != null
@@ -1983,21 +1983,13 @@
 ext(
-mItem.message
+%22wow%22
 );%0A 

add dummy chat messages