title: how to add table layout on alertDialog?
body: <p>I want to create custome dialog with table view , but dialog is not showing when i click on button.This is method called in button's onClick listener.....    </p>
  
  <pre><code>public void dialogTable(){
      int i;
      AlertDialog.Builder builder = new AlertDialog.Builder(this);
      LayoutInflater inflater = LayoutInflater.from(this);
      View alertView = inflater.inflate(R.layout.table_dialog, null);
      builder.setView(alertView);
      TableLayout tableLayout = (TableLayout)alertView.findViewById(R.id.tableLayout);
      TransactionDetails transactionDetails = new TransactionDetails();   //POJO class
  
      for( i=0; i &lt; 4; i++ ){
  
          TableRow tableRow = new TableRow(getBaseContext());
          tableRow.setLayoutParams(new LinearLayout.LayoutParams
                  (LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT));
  
          TextView textView1 = new TextView(getBaseContext());
          textView1.setText(transactionDetails.getCustomerNo());
          tableRow.addView(textView1);
  
          TextView textView2 = new TextView(getBaseContext());
          textView2.setText(transactionDetails.getAmount().toString());
          tableRow.addView(textView2);
  
          TextView textView3 = new TextView(getBaseContext());
          textView3.setText(transactionDetails.getStatus());
          tableRow.addView(textView3);
  
          tableLayout.addView(tableRow);
      }
  
      builder.setCancelable(true);
      AlertDialog alertDialog = builder.create();
      alertDialog.show();
  }
  </code></pre>