title: Start new activity from activity in viewpager?
body: <p>I am new to using viewpager to swipe between activities and currently have it set up like this:</p>
  
  <p>MainActivity.Java:</p>
  
  <pre><code>    package com.example.elfho.nceatracker;
  
      import android.support.v4.view.ViewPager;
      import android.support.v7.app.AppCompatActivity;
      import android.os.Bundle;
  
      public class MainActivity extends AppCompatActivity {
  
          @Override
          protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.activity_main);
  
              ViewPager viewPager = (ViewPager) findViewById(R.id.viewpager);
              viewPager.setAdapter(new CustomPagerAdapter(this));
  
          }
      }
  </code></pre>
  
  <p>ModelObject.Java:</p>
  
  <pre><code>public enum ModelObject {
  
          ONE(R.string.level1, R.layout.activity_level1),
          TWO(R.string.level2, R.layout.activity_level2),
          THREE(R.string.level3, R.layout.activity_level3);
  
          private int mTitleResId;
          private int mLayoutResId;
  
          ModelObject(int titleResId, int layoutResId) {
              mTitleResId = titleResId;
              mLayoutResId = layoutResId;
          }
  
          public int getTitleResId() {
              return mTitleResId;
          }
  
          public int getLayoutResId() {
              return mLayoutResId;
          }
       }
  </code></pre>
  
  <p>CustomPagerAdapter.java:</p>
  
  <pre><code>public enum ModelObject {
  
  ONE(R.string.level1, R.layout.activity_level1),
  TWO(R.string.level2, R.layout.activity_level2),
  THREE(R.string.level3, R.layout.activity_level3);
  
  private int mTitleResId;
  private int mLayoutResId;
  
  ModelObject(int titleResId, int layoutResId) {
      mTitleResId = titleResId;
      mLayoutResId = layoutResId;
  }
  
  public int getTitleResId() {
      return mTitleResId;
  }
  
  public int getLayoutResId() {
      return mLayoutResId;
   }
  
  }
  </code></pre>
  
  <p>This makes the app swipe between my three activities, activity_level1, activity_level2, and activity_level3.
  However, I have not created specific java files for these activities because I don't need to in order to open them correctly.
  If I now want to open a new activity from one of these 3 activities, where would I need to write the code to make this work?</p>