Hola, quisiera insertar una imagen en un linear Loyout. si el uso de XMl.
LinearLayout layout = new LinearLayout(this);
layout.setOrientation(LinearLayout.VERTICAL);
layout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
layout.setBackgroundColor(Color.YELLOW);
TextView titleView = new TextView(this);
titleView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
titleView.setTextAppearance(this, android.R.attr.textAppearanceLarge);
titleView.setText("Imagen 1");
layout.addView(titleView);
TextView green = new TextView(this);
green.setText("Green");
green.setBackgroundColor(Color.GREEN);
//green.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParam s.MATCH_PARENT, LinearLayout.LayoutParams.FILL_PARENT, 1));
layout.addView(green);
Quisiera que después de green llamo una imagen desde grawable. COmo lo hago?