add TextView to TableLayout - Android android.widget

Android examples for android.widget:TextView

Description

add TextView to TableLayout

Demo Code

import android.content.Context;
import android.widget.TableLayout;
import android.widget.TextView;

public class Main {

  public static void addTextView(Context ctx, TableLayout parent, String text) {
    TextView tv = new TextView(ctx);
    tv.setText(text);/*w ww.  j  a va2  s  .  c o  m*/
    parent.addView(tv);
  }

}

Related Tutorials