performClick()方法用于模拟View被点击的操作。正确使用performClick()方法的方式如下:
view.performClick();
if (view.isAttachedToWindow() && view.getVisibility() == View.VISIBLE) { view.performClick(); }
view.performLongClick();
button.performClick();