Android View добавить дочерний элемент

У меня есть следующие View и TextView. Как я могу добавить TextView в View как дочерний?

public class MyView extends View {

    public MyView(Context context, AttributeSet attrs) {
        super(context);

        TextView textView = new TextView(context);
        textView.setText("Hello My Friends");

    }
}

Спасибо!

9
задан jkigel 19 July 2012 в 05:31
поделиться