문제

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

도움이 되었습니까?

해결책

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

다른 팁

 Image_button.setOnTouchListener(new View.OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            //Do your implementation
        }
    });
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top