title: Updating radio button seleciton on UI
body: <p>Hi i'm trying to update the UI from a background thread. I'm setting the selection of a Radio Button programetically but strangely it wouldnt update the UI when I run the app. But when I debug the application step by step the UI updates itself which is very strange to me. following is the code I am using to do it.</p>
  
  <p>As post runnable returns a boolean and it seems to return true about the update but it doesnt update the UNI which is very strange.</p>
  
  <p>Thread</p>
  
  <pre><code>_internetConenctivityThread = new Thread(new Runnable() {
  
          @Override
          public void run() {
              // TODO Auto-generated method stub
              try
              {
                  CheckInternetConnectivity(conManager);
                  Thread.sleep(30000);
              }
              catch(Exception ex)
              {
                  Log.d("_internetConnectivityThread", "Exception while checking connectivity: " + ex.getMessage());
              }
          }
      }); 
      _internetConenctivityThread.start();
  </code></pre>
  
  <p>Method for the Check</p>
  
  <pre><code>private void CheckInternetConnectivity(ConnectivityManager cm)
      {
          try
          {           
              NetworkInfo netInfo = cm.getActiveNetworkInfo();
              if (netInfo != null &amp;&amp; netInfo.isConnected()) {
  
                  mParent.connectivity.post(new Runnable() {
  
                      @Override
                      public void run() {
                          // TODO Auto-generated method stub
                          // Updating Status Monitor for connectivity
                          mParent.connectivity.setChecked(true);
  
                      }
                  });         
              } 
              else 
              {
                  mParent.connectivity.post(new Runnable() {
  
                      @Override
                      public void run() {
                          // TODO Auto-generated method stub
                          // Updating Status Monitor for connectivity
                          mParent.connectivity.setChecked(false);
  
                      }
                  });                 
              }
          }
          catch(Exception ex)
          {
              ex.getMessage();
          }
      }
  </code></pre>