title: Android: Reload main activity
body: <p><strong>The up link is different to my problem</strong></p>
  
  <p>i have this structure:
  <strong>Main -> MenuItem -> AlertDialog class -> Click Button -> (Reload) Main</strong></p>
  
  <p>I want click button reload activity main. How i can make it?</p>
  
  <p>Thanks</p>
  
  <p>*<em>CLASE MAIN *</em></p>
  
  <pre><code>public class MainActivity extends Activity {
  
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  }
  public boolean onCreateOptionsMenu(Menu menu) {
  
      getMenuInflater().inflate(R.menu.main, menu);
      return true;
  }
  
  public boolean onPrepareOptionsMenu(Menu menu) {
  
      MenuItem item = menu.findItem(R.id.MenuOpcColores);
      return true;
  }
  
  public boolean onOptionsItemSelected(MenuItem item) {
  
      switch (item.getItemId()) {
          case R.id.MenuOpcColores:
              CambiarColores colores = new CambiarColores(this, 
                      R.layout.cambiar_colores, 
                      R.string.cambiarColores, 
                      R.color.estandar, 
                      R.id.botonAplicarColor,
                      R.id.botonCancelarColor); 
              colores.show();  
              return true;
          default:
              return super.onOptionsItemSelected(item);
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p><strong>CLASE DIALOG</strong></p>
  
  <pre><code>public class CambiarColores extends Dialog implements          android.view.View.OnClickListener{  
  
  Context context;
  
  
  public CambiarColores(Context context, int vista, int titulo, int color, int id1, int id2) {  
  
      super(context);  
      this.context = context;
      this.titulo = titulo;
      this.vista = vista;
      this.color = color;
      this.id1 = id1;
      this.id2 = id2;
  }  
  
  protected void onCreate(Bundle savedInstanceState) {  
  
      super.onCreate(savedInstanceState);
  
      setContentView(vista);  
  }  
  
  @Override  
  public void onClick(View v) {  
  
      // REFRESH MAIN 
  
  } 
  } 
  </code></pre>