/ / Agregar un diseño a otro diseño - Android, diseño

agregar un diseño a otro diseño - android, diseño

Es necesario agregar un diseño a otro diseño al hacer clic en un botón.

¿Es posible cómo.

Respuestas

2 para la respuesta № 1

Ejemplo aquí: ¿Cómo diseñar vistas en RelativeLayout programáticamente?


1 para la respuesta № 2

Es. Agregue este código al onClickListener de su botón:

LinearLayout layout = new LinearLayout(...);

// init this layout here

RelativeLayout parentLayout = (RelativeLayout) findViewById(R.id.myLayout);
parentLayout.addView(layout);