title: No error stated, though my startActivity(toy); does not open the new activity
body: <p>This code does not open the second activity from the press of the button(it animated and pushes down when i press it), there are no errors in the build or app terminations. i am unsure where i have gone wrong as i have used the exact intent before on another app.</p>
  
  <p>any help would be great!!!</p>
  
  <p><strong>AndroidManifest.xml</strong></p>
  
  <p>
  </p>
  
  <p>
      
          
              </p>
  
  <pre><code>        &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
      &lt;/intent-filter&gt;
  &lt;/activity&gt;
  &lt;activity
      android:name=".Main2Activity"
      android:label="@string/title_activity_main2"
      android:theme="@style/AppTheme.NoActionBar"&gt;&lt;/activity&gt;
  </code></pre>
  
  <p></p>
  
  <p></p>
  
  <p><strong>MainActivity.java</strong></p>
  
  <pre><code>public class MainActivity extends AppCompatActivity
      implements NavigationView.OnNavigationItemSelectedListener {
  
  // Button GUI
  public Button but1;
  // Button GUI end
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
  
      Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
      setSupportActionBar(toolbar);
  
  
      FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
      fab.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              Snackbar.make(view, "Replace with your own action",    
         Snackbar.LENGTH_LONG)
                      .setAction("Action", null).show();
          }
      });
  
      DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
      ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
              this, drawer, toolbar, R.string.navigation_drawer_open,   
     R.string.navigation_drawer_close);
      drawer.setDrawerListener(toggle);
      toggle.syncState();
  
      NavigationView navigationView = (NavigationView)
      findViewById(R.id.nav_view);
      navigationView.setNavigationItemSelectedListener(this);
  }
  
  @Override
  public void onBackPressed() {
      DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
      if (drawer.isDrawerOpen(GravityCompat.START)) {
          drawer.closeDrawer(GravityCompat.START);
      } else {
          super.onBackPressed();
      }
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.main, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle action bar item clicks here. The action bar will
      // automatically handle clicks on the Home/Up button, so long
      // as you specify a parent activity in AndroidManifest.xml.
      int id = item.getItemId();
  
      //noinspection SimplifiableIfStatement
      if (id == R.id.action_settings) {
          return true;
      }
  
      return super.onOptionsItemSelected(item);
  }
  
  @SuppressWarnings("StatementWithEmptyBody")
  @Override
  public boolean onNavigationItemSelected(MenuItem item) {
      // Handle navigation view item clicks here.
      int id = item.getItemId();
  
      if (id == R.id.nav_camera) {
          // Handle the camera action
      } else if (id == R.id.nav_gallery) {
  
      } else if (id == R.id.nav_slideshow) {
  
      } else if (id == R.id.nav_manage) {
  
      } else if (id == R.id.nav_share) {
  
      } else if (id == R.id.nav_send) {
  
      }
  
      DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
      drawer.closeDrawer(GravityCompat.START);
      return true;
  }
  
  
  // Button GUI
  
  public void init() {
      but1 = (Button) findViewById(R.id.but1);
  
  
      but1.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              Intent toy = new Intent(getApplicationContext(),  
     Main2Activity.class);
  
              startActivity(toy);
  
          }
      });
  
  }
  
  // Button GUI end
  }
  </code></pre>
  
  <p><strong>content_main.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
   &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  app:layout_behavior="@string/appbar_scrolling_view_behavior"
  tools:context="com.example.aaron.myapplication1.MainActivity"
  tools:showIn="@layout/app_bar_main"&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="active 1"
      android:layout_alignParentBottom="true"
      android:layout_alignParentRight="true"
      android:layout_alignParentEnd="true" /&gt;
  &lt;Button
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="press me"
      android:id="@+id/but1"
      android:layout_centerVertical="true"
      android:layout_centerHorizontal="true" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><strong>Main2Activity.java</strong></p>
  
  <pre><code>public class Main2Activity extends AppCompatActivity
      implements NavigationView.OnNavigationItemSelectedListener {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main2);
      Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
      setSupportActionBar(toolbar);
  
      FloatingActionButton fab = (FloatingActionButton)     
  findViewById(R.id.fab);
      fab.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              Snackbar.make(view, "Replace with your own action",
    Snackbar.LENGTH_LONG)
                      .setAction("Action", null).show();
          }
      });
  
      DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
      ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
              this, drawer, toolbar, R.string.navigation_drawer_open,       
    R.string.navigation_drawer_close);
      drawer.setDrawerListener(toggle);
      toggle.syncState();
  
      NavigationView navigationView = (NavigationView)   
    findViewById(R.id.nav_view);
      navigationView.setNavigationItemSelectedListener(this);
  }
  
  @Override
  public void onBackPressed() {
      DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
      if (drawer.isDrawerOpen(GravityCompat.START)) {
          drawer.closeDrawer(GravityCompat.START);
      } else {
          super.onBackPressed();
      }
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.main2, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle action bar item clicks here. The action bar will
      // automatically handle clicks on the Home/Up button, so long
      // as you specify a parent activity in AndroidManifest.xml.
      int id = item.getItemId();
  
      //noinspection SimplifiableIfStatement
      if (id == R.id.action_settings) {
          return true;
      }
  
      return super.onOptionsItemSelected(item);
  }
  
  @SuppressWarnings("StatementWithEmptyBody")
  @Override
  public boolean onNavigationItemSelected(MenuItem item) {
      // Handle navigation view item clicks here.
      int id = item.getItemId();
  
      if (id == R.id.nav_camera) {
          // Handle the camera action
      } else if (id == R.id.nav_gallery) {
  
      } else if (id == R.id.nav_slideshow) {
  
      } else if (id == R.id.nav_manage) {
  
      } else if (id == R.id.nav_share) {
  
      } else if (id == R.id.nav_send) {
  
      }
  
      DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
      drawer.closeDrawer(GravityCompat.START);
      return true;
  }
  }
  </code></pre>
  
  <p><strong>content_main2.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  app:layout_behavior="@string/appbar_scrolling_view_behavior"
  tools:context="com.example.aaron.myapplication1.Main2Activity"
  tools:showIn="@layout/app_bar_main2"&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="activ2"
      android:id="@+id/textView2"
      android:layout_alignParentTop="true"
      android:layout_alignParentRight="true"
      android:layout_alignParentEnd="true" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>