Menu item goes to second activity but does not load content (Android Studio) : So I have a Main Activity with the default activity which has the menu feature.
I went to the MainActivity.Java file and entered the code in the auto-generated 'if' statement for all buttons on the menu and when i run it nothing loads. I tried  adding a background color and only the color loaded no text.
Here is the code inside the if statement - 
     

      Intent i = new Intent(FromActivity.this, ToActivity.class);
      startActivity(i);
And in my XML file for the second activity here is the text view - 

    <TextView
    android:text="Test"
    android:width="wrap-content"
    android:height="wrap-content"/>


