@@ -0,0 +1,1991 @@
+package com.example.profbola.bakingtime.ui;%0A%0Aimport android.os.Bundle;%0Aimport android.support.annotation.Nullable;%0Aimport android.support.design.widget.TabLayout;%0Aimport android.support.v4.view.ViewPager;%0Aimport android.support.v7.app.AppCompatActivity;%0Aimport android.support.v7.widget.Toolbar;%0A%0Aimport com.example.profbola.bakingtime.R;%0Aimport com.example.profbola.bakingtime.models.Recipe;%0Aimport com.example.profbola.bakingtime.utils.RecipePagerAdapter;%0A%0A/**%0A * Created by prof.BOLA on 7/1/2017.%0A */%0A%0Apublic class RecipeDetailActivity extends AppCompatActivity %7B%0A%0A    private static final String INGREDIENT_TAB = %22ingredients%22;%0A    private static final String STEP_TAB = %22steps%22;%0A%0A    private Toolbar toolbar;%0A    private TabLayout tabLayout;%0A    private ViewPager viewPager;%0A%0A    @Override%0A    protected void onCreate(@Nullable Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.recipe_detail_activity);%0A%0A        toolbar = (Toolbar) findViewById(R.id.toolbar);%0A        setSupportActionBar(toolbar);%0A%0A        getSupportActionBar().setDisplayHomeAsUpEnabled(true);%0A%0A        viewPager = (ViewPager) findViewById(R.id.viewPager);%0A%0A        Recipe recipe = (Recipe) getIntent().getExtras().get(%22NAME%22);%0A        setUpViewPager(recipe);%0A%0A        tabLayout = (TabLayout) findViewById(R.id.tabs);%0A        tabLayout.setupWithViewPager(viewPager, true);%0A%0A    %7D%0A%0A    private void setUpViewPager(Recipe recipe) %7B%0A        RecipePagerAdapter adapter = new RecipePagerAdapter(getSupportFragmentManager());%0A        //TODO: Add the fragments%0A        IngredientsFragment ingredientsFragment = new IngredientsFragment();%0A        ingredientsFragment.addData(recipe.ingredients);%0A%0A        StepsFragment stepsFragment = new StepsFragment();%0A        stepsFragment.addData(recipe.steps);%0A%0A        adapter.addFragment(ingredientsFragment, INGREDIENT_TAB);%0A        adapter.addFragment(stepsFragment, STEP_TAB);%0A%0A        viewPager.setAdapter(adapter);%0A    %7D%0A%0A%7D%0A

Add RecipeDetailActivity