0

can any one tell me how to simulate touch on Image Button using android view client python

user
  • 65
  • 1
  • 11

2 Answers2

0
 Image_button.setOnTouchListener(new View.OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            //Do your implementation
        }
    });
Ritaban
  • 763
  • 4
  • 8
0

The simplest way is using culebra:

$ culebra -VC -o myscript.py

Then, edit myscript.py and search for your ImageView, it might be something like

# class=android.widget.ImageView
no_id20 = vc.findViewByIdOrRaise("id/no_id/20")

and add

no_id20.touch()

save the edited script and run it.

$ ./myscript.py
Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134