title: Android Null Pointer Exception on Textview setText
body: <p>Android Null pointer exception thrown on settext ran in UI thread forced</p>
  
  <pre><code>runOnUiThread(new Runnable() {
                      @Override
                      public void run() {
                          String name=portalData.getFullname();
  
                          setContentView(R.layout.gradebook);
                              tname.setText(name);
  
                             }
                  });
  </code></pre>
  
  <p>the </p>
  
  <p>i have made a static member of TextView 
  on Create Im doing this</p>
  
  <p>super.onStart();</p>
  
  <pre><code>    setContentView(R.layout.gradebook);
        tname=(TextView)findViewById(R.id.fullname); 
  </code></pre>
  
  <p>cannot understand what is causing this 
  stacktrace</p>
  
  <pre><code>10-15 15:19:07.090: E/AndroidRuntime(1604): FATAL EXCEPTION: main
  10-15 15:19:07.090: E/AndroidRuntime(1604): java.lang.NullPointerException
  10-15 15:19:07.090: E/AndroidRuntime(1604):     at com.example.campus.Gradebook$ObservableDemo$6.run(Gradebook.java:518)
  10-15 15:19:07.090: E/AndroidRuntime(1604):     at android.os.Handler.handleCallback(Handler.java:730)
  10-15 15:19:07.090: E/AndroidRuntime(1604):     at android.os.Handler.dispatchMessage(Handler.java:92)
  10-15 15:19:07.090: E/AndroidRuntime(1604):     at android.os.Looper.loop(Looper.java:137)
  10-15 15:19:07.090: E/AndroidRuntime(1604):     at android.app.ActivityThread.main(ActivityThread.java:5103)
  10-15 15:19:07.090: E/AndroidRuntime(1604):     at java.lang.reflect.Method.invokeNative(Native Method)
  10-15 15:19:07.090: E/AndroidRuntime(1604):     at java.lang.reflect.Method.invoke(Method.java:525)
  10-15 15:19:07.090: E/AndroidRuntime(1604):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
  10-15 15:19:07.090: E/AndroidRuntime(1604):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
  10-15 15:19:07.090: E/AndroidRuntime(1604):     at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>here is the XML</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      tools:context=".vbook" &gt;
  
      &lt;TextView
          android:id="@+id/textView3"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true"
          android:layout_marginLeft="70dp"
          android:layout_marginTop="40dp"
          android:text="Large Text"
          android:textAppearance="?android:attr/textAppearanceLarge"
          android:textColor="#007FFF" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>