package com.maxiee.attitude.ui;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.maxiee.attitude.R;

/**
 * Created by maxiee on 15-6-13.
 */
public class EventDetailActivity extends AppCompatActivity {

    public static final String EXTRA_NAME = "id";

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

@@ -26,16 +26,47 @@
 de.ui;%0A%0A
+import android.content.Intent;%0A
 import a
@@ -136,37 +136,427 @@
 ty;%0A
-%0Aimport com.maxiee.attitude.R
+import android.support.v7.widget.LinearLayoutManager;%0Aimport android.support.v7.widget.RecyclerView;%0Aimport android.support.v7.widget.Toolbar;%0Aimport android.util.Log;%0Aimport android.widget.TextView;%0A%0Aimport com.maxiee.attitude.R;%0Aimport com.maxiee.attitude.database.api.GetOneEventApi;%0Aimport com.maxiee.attitude.model.Event;%0Aimport com.maxiee.attitude.ui.adapter.ThoughtTimeaxisAdapter;%0A%0Aimport org.json.JSONException
 ;%0A%0A/
@@ -657,16 +657,115 @@
 vity %7B%0A%0A
+    private Event mEvent;%0A%0A    private TextView mTvEvent;%0A    private RecyclerView mRecyclerView;%0A%0A
     publ
@@ -977,16 +977,784 @@
 detail);
+%0A%0A        Intent intent = getIntent();%0A        final int id = intent.getIntExtra(EXTRA_NAME, -1);%0A%0A        final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);%0A        setSupportActionBar(toolbar);%0A        getSupportActionBar().setDisplayHomeAsUpEnabled(true);%0A%0A        mTvEvent = (TextView) findViewById(R.id.tv_event);%0A        mRecyclerView = (RecyclerView) findViewById(R.id.recyclerview);%0A%0A        try %7B%0A            mEvent =  new GetOneEventApi(this, id).exec();%0A            mTvEvent.setText(mEvent.getmEvent());%0A            mRecyclerView.setLayoutManager(new LinearLayoutManager(this));%0A            mRecyclerView.setAdapter(new ThoughtTimeaxisAdapter(mEvent.getmThoughts()));%0A        %7D catch (JSONException e) %7B%0A            e.printStackTrace();%0A        %7D
 %0A    %7D%0A%7D

read DB to fetch Event details and update UI.