gpt4 book ai didi

安卓 : How to simply add categories/Separators/Section header in my list view?

转载 作者:行者123 更新时间:2023-11-29 21:58:03 25 4
gpt4 key购买 nike

我用这种方式制作了一个 ListView :

String[] list = {"1","2","3","A","B","C"};

Widget_List_Adapter adapter = new Widget_List_Adapter(this, list);

//set the onItemClickListener as usual
getListView().setOnItemClickListener(this);

//set our custom list item listener for the extra functions
adapter.setListener(this);

setListAdapter(adapter);

现在我怎样才能简单地添加一些类别?

最佳答案

您必须维护自定义适配器以将类别实现到您的 ListView 中。看看这个tutorial

关于安卓 : How to simply add categories/Separators/Section header in my list view?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12706120/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com