模拟view点击事件

以模拟listview的点击事件为例,代码如下

mListView.performItemClick(mListView.getAdapter().getView(your_click_position, null, null), your_click_position, mListView.getItemIdAtPosition(your_click_position));

or

mListView.performItemClick(mListView.getChildAt(your_click_position), your_click_position, mListView.getItemIdAtPosition(your_click_position));

你可能感兴趣的:(模拟view点击事件)