I have Linear Layout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/linear"
android:orientation="horizontal"
android:onClick="onClickAcao">
</LinearLayout>
public void image(ImageView image,int rid,LinearLayout linear )
{
image.setBackgroundResource(rid);
linear.addView(image);
}
And in this Linear layout
goes a ImagemView
created via code, with imagemView
created in Linear Layout
as image that takes all Linear Layout
when clicking it does not perform action of linear Layout, You can do ImagemView
does not interfere with the action ?.