package com.garpr.android.activities;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ListView;
import android.widget.TextView;

import com.garpr.android.R;
import com.garpr.android.models.Player;


public class PlayerActivity extends BaseActivity {


    private static final String CNAME = PlayerActivity.class.getCanonicalName();
    private static final String EXTRA_PLAYER = CNAME + ".EXTRA_PLAYER";

    private ListView mListView;
    private Player mPlayer;
    private TextView mRank;




    public static void start(final Activity activity, final Player player) {
        final Intent intent = new Intent(activity, PlayerActivity.class);
        intent.putExtra(EXTRA_PLAYER, player);
        activity.startActivity(intent);
    }


    @Override
    protected void findViews() {
        super.findViews();
        mListView = (ListView) findViewById(R.id.activity_player_list);
        mRank = (TextView) findViewById(R.id.activity_player_rank);
    }


    @Override
    protected int getContentView() {
        return R.layout.activity_player;
    }


    @Override
    protected void onCreate(final Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        readIntent();
        findViews();
        prepareViews();
    }


    private void prepareViews() {
        setTitle(mPlayer.getName());
        mRank.setText(String.valueOf(mPlayer.getRank()));
    }


    private void readIntent() {
        final Intent intent = getIntent();
        mPlayer = intent.getParcelableExtra(EXTRA_PLAYER);
    }


}

@@ -244,22 +244,90 @@
 .models.
-Player
+Match;%0Aimport com.garpr.android.models.Player;%0A%0Aimport java.util.ArrayList
 ;%0A%0A%0Apubl
@@ -529,16 +529,55 @@
 AYER%22;%0A%0A
+    private ArrayList%3CMatch%3E mMatches;%0A
     priv
@@ -898,32 +898,95 @@
 ntent);%0A    %7D%0A%0A%0A
+    protected void downloadMatches() %7B%0A        // TODO%0A    %7D%0A%0A%0A
     @Override%0A  
@@ -1474,24 +1474,188 @@
 pareViews();
+%0A%0A        if (mPlayer.hasMatches()) %7B%0A            mMatches = mPlayer.getMatches();%0A            showList();%0A        %7D else %7B%0A            downloadMatches();%0A        %7D
 %0A    %7D%0A%0A%0A   
@@ -1855,32 +1855,32 @@
  = getIntent();%0A
-
         mPlayer 
@@ -1930,10 +1930,66 @@
     %7D%0A%0A%0A
+    protected void showList() %7B%0A        // TODO%0A    %7D%0A%0A%0A
 %7D%0A

put in the bare minimum of skeleton code for PlayerActivity