title: textView.setText not working
body: <p>I have a TextView in a fragment called "frontpage". In my MainActivity (also called frontpage, and the fragment is also there), I want to change the text of my textview. Here is my code in the Mainactivity:</p>
  
  <p>public static class PlaceholderFragment extends Fragment {</p>
  
  <pre><code>public PlaceholderFragment() {
  
  
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      View rootView = inflater.inflate(R.layout.fragment_frontpage, container, false);
      return rootView;
  
  }
  public void setText(String text){
      TextView textView = (TextView) getView().findViewById(R.id.NameView);
      textView.setText("HI!");
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And here is my code in the xml layout for the textview:</p>
  
  <pre><code>&lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceLarge"
      android:id="@+id/NameView"
      android:layout_below="@+id/textView"
      android:layout_centerHorizontal="true" /&gt;
  </code></pre>
  
  <p>No errors are being shown, but when running the app, the textview stays empty. Why is that?</p>