title: EditText getText().toString() not working
body: <p>I've been Googling for a while, but I can't find anything that solves my problem. I have some code in a nested fragment class that looks like this:</p>
  
  <pre><code>String infinitive;
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          View rootView = inflater.inflate(R.layout.fragment_main, container, false);
  
          // Grabs input from text field and places it in String infinitive
          final EditText mMainTextField = (EditText) rootView.findViewById(R.id.mainTextField);
          infinitive = mMainTextField.getText().toString();
  
          final Button mConjugateButton = (Button) rootView.findViewById(R.id.conjugateButton);
          mConjugateButton.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
  
                  boolean isEndingAr = infinitive.endsWith("ar");
                  boolean isEndingEr = infinitive.endsWith("er");
                  boolean isEndingIr = infinitive.endsWith("ir");
  
                  // Check to see what kind of verb it is before conjugating
                  if (isEndingAr) {
                      conjugateArVerb();
                  } else if (isEndingEr) {
                      conjugateErVerb();
                  } else if (isEndingIr) {
                      conjugateIrVerb();
                  } else {
                      Toast testToast = Toast.makeText(getActivity(), "Could not conjugate the verb: " + infinitive, Toast.LENGTH_SHORT);
                      toast.show();
                  }
              }
  </code></pre>
  
  <p>My problem is that this line doesn't seem to be working:</p>
  
  <pre><code>infinitive = mMainTextField.getText().toString(); 
  </code></pre>
  
  <p>The testToast only returns "Could not conjugate: " not the value I input into the text field. I would post the XML file and the rest of the code in MainActivity.java, but I think this my problem is specifically with the getText().toString() line. </p>
  
  <p>Please help me figure this out. Thanks in advance.</p>