package com.robertboloc.eu.holaurv;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.view.ViewPager;

public class DisplayActivity extends FragmentActivity {

    ViewPager mViewPager;
    DayCollectionPagerAdapter mDayCollectionPagerAdapter;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_display);

        mDayCollectionPagerAdapter = new DayCollectionPagerAdapter(
                getSupportFragmentManager(), this);

        mViewPager = (ViewPager) findViewById(R.id.pager);
        mViewPager.setAdapter(mDayCollectionPagerAdapter);
    }
}

@@ -30,16 +30,48 @@
 laurv;%0A%0A
+import org.joda.time.DateTime;%0A%0A
 import a
@@ -481,24 +481,79 @@
 _display);%0A%0A
+        DateTime date = org.joda.time.DateTime.now();%0A%0A
         mDay
@@ -775,20 +775,76 @@
 erAdapter);%0A
+        mViewPager.setCurrentItem(date.getDayOfWeek());%0A
     %7D%0A%7D%0A

set the current day as default on pager