Android examples for android.widget:TableLayout
add Button to TableLayout
import android.content.Context; import android.widget.Button; import android.widget.TableLayout; public class Main { public static Button addButton(Context ctx, TableLayout parent, String text) { Button btn = new Button(ctx); btn.setText(text);//from w w w.j ava 2 s . c om parent.addView(btn); return btn; } }