SectionedAdapter 传递多个字符串
在适配器中我有类似的东西
protected View getHeaderView(String caption, int index,
View convertView, ViewGroup parent) {
,在标题变量中我有一个字符串。该字符串沿着适配器传递
adapter.addSection("the string", myadapter);
我如何传递多个字符串?例如,我有字符串 A 和字符串 B,如何将它们传递给适配器以及稍后如何读取它们? 我需要这样的东西
adapter.addsection(a, b, myadapter);
in the adapter I have something like this
protected View getHeaderView(String caption, int index,
View convertView, ViewGroup parent) {
and in the caption variable I have one string. This string is passed along the adapter
adapter.addSection("the string", myadapter);
How can I pass more than one String? For example I have String A and String B, how can I pass them to the adapter and how can I read them latter on?
I need something like this
adapter.addsection(a, b, myadapter);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我很愚蠢:),解决方案很简单,而不是传递字符串,我只是传递了字符串数组...
我的问题是我不知道我可以更改方法定义...
I was stupid :), the solution was easy instead to pass string I just passed array of strings...
My problem was that I didn't know that I can change the method definition...