Invoking click event on all the views (Buttons, Layout etc.,) through code can be done so easily.
Method 1
Call performClick() function on the view for which you want to perform click event
Button btnSend = findViewById(R.id.btnSend);LinearLayout layoutContainer = findViewById(R.id.container);// perform click on buttonbtnSend.performClick();// perform click on Linear LayoutlayoutContainer.performClick(); |
No comments:
Post a Comment