package com.dreiri.stolpersteine.activities.info;

import java.util.ArrayList;

import android.app.ActionBar;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;

import com.dreiri.stolpersteine.R;
import com.dreiri.stolpersteine.activities.bio.BioActivity;
import com.dreiri.stolpersteine.api.model.Stolperstein;

public class InfoActivity extends Activity {

    ArrayList<Stolperstein> stolpersteine;
    String bioUrl;
    ListView listView;
    
    public static Intent createIntent(Context context, ArrayList<Stolperstein> stolpersteine) {
        Intent intent = new Intent(context, InfoActivity.class);
        intent.putParcelableArrayListExtra("stolpersteine", stolpersteine);
        
        return intent;
    }
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ActionBar actionBar = getActionBar();
        actionBar.setDisplayHomeAsUpEnabled(true);
        setContentView(R.layout.activity_info);
        listView = (ListView) findViewById(R.id.list);
        Intent intent = getIntent();
        if (intent.hasExtra("stolpersteine")) {
            stolpersteine = intent.getParcelableArrayListExtra("stolpersteine");
            Integer number_found = stolpersteine.size();
            if (number_found > 1) {
                actionBar.setTitle(Integer.toString(number_found) + " Stolpersteine");
            } else {
                actionBar.setTitle(Integer.toString(number_found) + " Stolperstein");
            }
            StolpersteinAdapter stolpersteinAdapter = new StolpersteinAdapter(this, stolpersteine);
            listView.setAdapter(stolpersteinAdapter);
            listView.setOnItemClickListener(new OnItemClickListener() {

                @Override
                public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                    Stolperstein stolperstein = (Stolperstein)listView.getItemAtPosition(position);
                    bioUrl = stolperstein.getPerson().getBiographyUri().toString();
                    startActivity(BioActivity.createIntent(InfoActivity.this, bioUrl));
                }
            });
        }
    }
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.info, menu);
        return true;
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
        case android.R.id.home:
            finish();
        }
        return true;
    }
    
}
@@ -628,98 +628,8 @@
  %7B%0A%0A
-    ArrayList%3CStolperstein%3E stolpersteine;%0A    String bioUrl;%0A    ListView listView;%0A    %0A
     
@@ -1164,32 +1164,47 @@
 _info);%0A        
+final ListView 
 listView = (List
@@ -1330,16 +1330,40 @@
         
+ ArrayList%3CStolperstein%3E
  stolper
@@ -2197,16 +2197,23 @@
         
+String 
 bioUrl =

Use local instead of class scope