package org.pma.nutrifami.activity;

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

import org.pma.nutrifami.R;
import org.pma.nutrifami.adapter.LessonPagePagerAdaptor;
import org.pma.nutrifami.lib.ModuleManager;
import org.pma.nutrifami.model.Module;

import me.crosswall.lib.coverflow.CoverFlow;

public class ModuleActivity extends FragmentActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_module_carousel);

        ModuleManager moduleManager = ModuleManager.getInstance();
        // TODO: Get real module
        Module module = moduleManager.getModules()[0];

        ViewPager mPager = (ViewPager) findViewById(R.id.lesson_page_pager);
        PagerAdapter mPagerAdapter = new LessonPagePagerAdaptor(getSupportFragmentManager(), module);
        mPager.setAdapter(mPagerAdapter);

        new CoverFlow.Builder()
                .with(mPager)
                .scale(0.15f)
                .build();
    }
}

@@ -870,16 +870,58 @@
 pager);%0A
+        mPager.setOffscreenPageLimit(2);%0A%0A
         

Fix wrong scaling of lessons in module detail view