title: Updating a textview in different layout xml from the MainAcivity.java?
body: <p>I've created a new .xml file in my layout folder called game.xml. It contains an TextView.</p>
  
  <p>Is it possible to set the text on the textview located in the game.xml from my main activity?</p>
  
  <p>game.xml (Textview part)</p>
  
  <pre><code>&lt;TextView
      android:id="@+id/tV1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignLeft="@+id/imageView1"
      android:layout_centerVertical="true"
      android:text="TextView" /&gt;
  </code></pre>
  
  <p>MainActivity.java</p>
  
  <pre><code>    protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      setImageArray();
      String actualword = chooseWord(words);
      createLetterArray(actualword);
      TextView textView1 = (TextView) findViewById(R.id.tV1); //get a reference to the textview on the game.xml file.
      textView1.setText(actualword);
  
  }
      ...
  </code></pre>
  
  <p>I tried it this way. But it doesn't work. Anyone who can help me ?</p>