title: Android: Access fragment TextView from Activity
body: <p>I want to access fragment TextView inside my activity because I need to change it from activity. However it returns nullpointerexception. If I put fragment textview inside reference of spinner onItemSelected listener it works. Here is a bit of code to explain. This one works</p>
  
  <pre><code> spinnerOblasti.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
              @Override
              public void onItemSelected(AdapterView&lt;?&gt; parentView, View selectedItemView, int position, long id) {
  
                  TextView[] vystrahy = new TextView[1];
                  vystrahy[0] = (TextView) findViewById(R.id.txtVystrahy);
  
                  vystrahyListener = new htmlParserListener(vystrahy);
                  (new htmlParser(0, vystrahyListener) ).execute();
  
                  TextView[] podmienky = new TextView[6];
                  podmienky[0] = (TextView) findViewById(R.id.txtPodmienkySkala);
                  podmienky[1] = (TextView) findViewById(R.id.txtPodmienkyLad);
                  podmienky[2] = (TextView) findViewById(R.id.txtPodmienkyMix);
                  podmienky[3] = (TextView) findViewById(R.id.txtPodmienkyLyze);
                  podmienky[4] = (TextView) findViewById(R.id.txtPodmienkyTuristika);
                  podmienky[5] = (TextView) findViewById(R.id.txtPodmienkyKomentar);
  
                  podmienkyListener = new htmlParserListener(podmienky);
                  (new htmlParser(1, podmienkyListener) ).execute();
              }
  
              @Override
              public void onNothingSelected(AdapterView&lt;?&gt; parent) {
  
              }
          });
  </code></pre>
  
  <p>But I need it to work also outside onItemSelected listener. So is there a way to access fragment TextView from Activitiy?</p>
  
  <p>Thanks in forward</p>