i use layoutparams to set the position of a few views, some are overlapped. when i touch the overlapped part, both the two views which include the overlapped part corresponded to the touch event! but i just want the above one to correspond to, can anyone can help me? thanks for answers!
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( 50, 50 );
params.Left_AlignMargin = 100;
params.Top_AlignMargin = 100;
relativeLayout.addView( imgeView, params );
params = new RelativeLayout.LayoutParams( 50, 50 );
params.Left_AlignMargin = 50;
params.Top_AlignMargin = 100;
relativeLayout.addView( imageView2, params );
//when i clicked the overlapped part, both imageview correspond to my action.how to deal with this ?