Home > Mobile >  Under the button controls how to realize the response?
Under the button controls how to realize the response?

Time:10-05

I have buttona and b, the button a covered in b above, a pressure b so can only see a, how can a realization at the same time with a single click of the button a and button b click event?

CodePudding user response:

OnTouchEvent activity, compared with the position of the Button a, click on the coordinates of the range, is executed you click on a b to perform the operation

CodePudding user response:

You perform in a click listener p. erformClick ()

CodePudding user response:

With two buttons, one could not see, can't are carried out in the button a event?

CodePudding user response:

PerformClick () method is to use a code the initiative for the click event to call control (simulated manpower to touch controls)

CodePudding user response:

The second floor perfect solution,

CodePudding user response:

Support 2 l and 4 l performClick () method can solve the problem

CodePudding user response:

Personal idea and 3 floor, why should one more key, their function 2 for one not to go,

CodePudding user response:

Direct implementation of the two buttons function is not ok

CodePudding user response:

Extraction method, the code Click points a and b b a direct method
  • Related