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 java.util.ArrayList;

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

public class MainActivity extends ActionBarActivity {

    private RecyclerView recyclerView;

    @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);
        recyclerView.setLayoutManager(layoutManager);

        ArrayList<Article> articles = new ArrayList<Article>();
        ArticleRecyclerViewAdapter adapter = new ArticleRecyclerViewAdapter(articles);

        for (int i = 1; i <= 150; i++) {
            articles.add(new Article(i + ".10.2014", "Artikel Nummer " + i));
        }

        recyclerView.setAdapter(adapter);
    }

}

@@ -222,37 +222,232 @@
 ew;%0A
-%0Aimport java.util.ArrayList;%0A
+import android.util.Log;%0A%0Aimport org.xmlpull.v1.XmlPullParserException;%0A%0Aimport java.io.BufferedInputStream;%0Aimport java.io.IOException;%0Aimport java.util.ArrayList;%0A%0Aimport de.metalmatze.krautreporter.KrautreporterRssParser;
 %0Aimp
@@ -672,14 +672,64 @@
   pr
-ivate 
+otected RecyclerView recyclerView;%0A    protected Article
 Recy
@@ -728,32 +728,39 @@
 icleRecyclerView
+Adapter
  recyclerView;%0A%0A
@@ -756,16 +756,65 @@
 clerView
+Adapter;%0A%0A    private ArrayList%3CArticle%3E articles
 ;%0A%0A    @
@@ -1235,32 +1235,37 @@
 ion(0);%0A        
+this.
 recyclerView.set
@@ -1307,279 +1307,486 @@
     
-ArrayList%3CArticle%3E articles = new ArrayList%3CArticle%3E();%0A        ArticleRecyclerViewAdapter adapter = new ArticleRecyclerViewAdapter(articles);%0A%0A        for (int i = 1; i %3C= 150; i++) %7B%0A            articles.add(new Article(i + %22.10.2014%22, %22Artikel Nummer %22 + i
+BufferedInputStream inputStream = null;%0A        try %7B%0A%0A                inputStream = new BufferedInputStream(getAssets().open(%22krautreporter.rss%22));%0A                this.articles = new KrautreporterRssParser().parse(inputStream);%0A%0A            %7D catch (IOException e) %7B%0A                e.printStackTrace();%0A            %7D catch (XmlPullParserException e) %7B%0A                e.printStackTrace();%0A            %7D%0A%0A        Log.d(%22An article%22, this.articles.get(0).toString(
 ));%0A
+%0A
         
 %7D%0A%0A 
@@ -1773,34 +1773,105 @@
 ng());%0A%0A        
-%7D%0A
+this.recyclerViewAdapter = new ArticleRecyclerViewAdapter(this.articles);
 %0A        recycle
@@ -1863,16 +1863,21 @@
         
+this.
 recycler
@@ -1892,17 +1892,34 @@
 Adapter(
-a
+this.recyclerViewA
 dapter);
@@ -1919,16 +1919,17 @@
 apter);%0A
+%0A
     %7D%0A%0A%7D

Use KrautreporterRssParser in MainActivity@onCreate()