Ideas:
1. Based on View.dispatchtouchevent
Role:
1. When clicked, pass the container point to the control that is not its child control,!
2. Pass the event to the activity below, through transparent activity or dialog!
Note:1> is also available through Motionevent.obtain (downtime, eventtime, action, X, Y, metaState), simulated events such as for booting,!
The container to be clicked:
public class Mylinearlayout extends LinearLayout {public mylinearlayout (Context arg0, AttributeSet arg1) {//TODO Auto-gen Erated Constructor Stubsuper (arg0, arg1);} @Overridepublic boolean onintercepttouchevent (motionevent ev) {//TODO auto-generated method stubmotionevent Event2 = Mot Ionevent.obtain (EV);//mainactivity.lltest is the target container, and a copy of the event is distributed to LlTestMainActivity.llTest.dispatchTouchEvent (EVENT2) ; return super.onintercepttouchevent (EV);}}
, when you click the left button, the event also passes to the right: