title: Android settext() from another class(not an activity) not working
body: <p>I have a main Activity where I have a layout inflated.
  I have a text view (textView)in the activity which I want to update from another class named 'Util.java' (this class does not extend anything, it is just a library class) where I have written methods common to the project for re usability).</p>
  
  <p>Now on receiving a broadcast I update the text of the 'textView' by calling the method in Util.java using 'Util.setLoadingText(R.string.loadingText_creating_device);'</p>
  
  <pre><code> public static void setLoadingText(int resId) {
      if (!Util.isNull(loadingText)) {
          Log.d(Util.TAG, LOG_LABEL + "SET TEXT CALLED:SHOW LOADING SCREEN" );
          loadingText.setText(resId);
  
      }
  }
  </code></pre>
  
  <p>before calling the above method, I am calling 'Util.init(this)' in the onCreate of the main activity.below is the code for </p>
  
  <pre><code> public static void init(Activity activity) {
      activity.setContentView(R.layout.loading_screen);
      Log.d(Util.TAG, LOG_LABEL + "INIT CALLED:SHOW LOADING SCREEN" );
      loadingText = (TextView) activity.findViewById(R.id.loadingScreenTextView);
  }
  </code></pre>
  
  <p>There are no compilation errors, but the </p>
  
  <pre><code>  loadingText.setText(resId);
  </code></pre>
  
  <p>does not update the text.
  Can anyone point out where I am going wrong? </p>