How to hide an item in a listview in Android

后端 未结 11 1070
天涯浪人
天涯浪人 2020-12-03 07:15

I know, this question was asked before, but I haven\'t seen a working answer for it.

Is there any way to hide some items in a ListView without changing

11条回答
  •  盖世英雄少女心
    2020-12-03 08:02

    Simple way to resolve this problem for me, just parse and check your list in activity before calling method "setAdapter", for example:

    for(Object a : list){
    //here must be some condition for getting all items without hidden
    newList += a;
    }
    setAdapter(newList);
    

提交回复
热议问题