开发者

How to pass on all the items automatically in Android ListView?

I have Android ListView that holding some items, the flow that I'am trying to do:

  1. Select first item
  2. Highlight item
  3. move to next item
  4. do step 2
  5. Loop step 2 and 3 until last step

the only input from user is to start the above flow.

The list is actually steps that holding HTTP requests, when the user click on play button, the steps inside the list will be executed one after one until all the list will be don开发者_开发技巧e, while the list is being played, I need to highlight each item.

Any Idea?


I'm not sure what you are trying to achieve, but you can try the following code:

  int itemsInList=myList.getAdapter().getCount();
  for(int i=1;i<itemsInList;i++){
      myList.setSelection(i);
  }


put alert telling user you need to select the item......that's what you need to do...

for alert you can show toast or alertdialog

that's what r asking?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜