package de.metalmatze.krautreporter.activities;

import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;

import org.xmlpull.v1.XmlPullParserException;

import java.io.BufferedInputStream;
import java.io.IOException;
import java.util.ArrayList;

import de.metalmatze.krautreporter.KrautreporterRssParser;
import de.metalmatze.krautreporter.R;
import de.metalmatze.krautreporter.adapters.ArticleRecyclerViewAdapter;
import de.metalmatze.krautreporter.entities.Article;

public class MainActivity extends ActionBarActivity {

    protected RecyclerView recyclerView;
    protected ArticleRecyclerViewAdapter recyclerViewAdapter;

    private ArrayList<Article> articles;

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

        this.recyclerView = (RecyclerView) findViewById(R.id.recyclerView);

        LinearLayoutManager layoutManager = new LinearLayoutManager(this);
        layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
        layoutManager.scrollToPosition(0);
        this.recyclerView.setLayoutManager(layoutManager);

        BufferedInputStream inputStream = null;
        try {

                inputStream = new BufferedInputStream(getAssets().open("krautreporter.rss"));
                this.articles = new KrautreporterRssParser().parse(inputStream);

            } catch (IOException e) {
                e.printStackTrace();
            } catch (XmlPullParserException e) {
                e.printStackTrace();
            }

        Log.d("An article", this.articles.get(0).toString());

        this.recyclerViewAdapter = new ArticleRecyclerViewAdapter(this.articles);
        this.recyclerView.setAdapter(this.recyclerViewAdapter);

    }

}

@@ -221,33 +221,8 @@
 iew;
-%0Aimport android.util.Log;
 %0A%0Aim
@@ -1345,20 +1345,16 @@
         
-    
 inputStr
@@ -1431,28 +1431,24 @@
             
-    
 this.article
@@ -1497,28 +1497,24 @@
 utStream);%0A%0A
-    
         %7D ca
@@ -1539,36 +1539,32 @@
 ) %7B%0A            
-    
 e.printStackTrac
@@ -1560,36 +1560,32 @@
 ntStackTrace();%0A
-    
         %7D catch 
@@ -1617,36 +1617,32 @@
 ) %7B%0A            
-   
- 
 e.printStackTrac
@@ -1658,76 +1658,9 @@
     
-    %7D%0A%0A        Log.d(%22An article%22, this.articles.get(0).toString());
+%7D
 %0A%0A  
@@ -1799,22 +1799,21 @@
 ewAdapter);%0A
-%0A
     %7D%0A%0A%7D%0A

Improve readability of MainActivity