How to make the first item of a ListView to be selected as default at startup?

前端 未结 13 1027
甜味超标
甜味超标 2020-12-11 16:08

There is a ListView in my App and the ListView has a selector. I want to make the first item of this ListView to be selected as default at the very

13条回答
  •  Happy的楠姐
    2020-12-11 16:44

    This works if you want to click it to get additional event handling done:

    listView.getAdapter().getView(position, null, null).performClick();
    

提交回复
热议问题