Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to execute "callOnClick()" for android API 8?

I'm using "callOnClick()" in my android app

but it's suppose to support min android API 8.

how can I imitate button click un API 8?

mSwitchBg is of type ImageView

enter image description here

like image 398
Elad Benda Avatar asked Jan 12 '23 22:01

Elad Benda


2 Answers

try this:

mSwitchBg.performClick();

it will work from API level1

like image 199
balaji koduri Avatar answered Jan 19 '23 15:01

balaji koduri


Try using mSwitchBg.performClick()

like image 39
Rohit5k2 Avatar answered Jan 19 '23 16:01

Rohit5k2