function ServantWindow:onEnter()
self._list:addEventListener(function(sender, eventType)
if eventType == ccui.ListViewEventType.ONSELECTEDITEM_END then
local index = sender:getCurSelectedIndex()
end
end)
for i = 1, 4 do
local img = "servantinfo/yongbingtouxiang0"..i..".png"
local custom_button = ccui.Button:create(img, img)
self._list:addChild(custom_button)
end
end
```
各位大神,请问怎么设置listview的默认选中项,也就是第一次加载的时候自动选中一项,或者在加载的时候进行一次模拟点击????:6::6::6::6::6: