【问题标题】:SectionedAdapter passing more then one stringSectionedAdapter 传递多个字符串
【发布时间】:2011-11-09 13:42:13
【问题描述】:

在适配器中我有这样的东西

protected View getHeaderView(String caption, int index, 
                             View convertView, ViewGroup parent) {

并且在标题变量中我有一个字符串。此字符串沿适配器传递

adapter.addSection("the string", myadapter);

如何传递多个字符串?例如,我有字符串 A 和字符串 B,如何将它们传递给适配器,以及如何在后面读取它们? 我需要这样的东西

adapter.addsection(a, b, myadapter);

【问题讨论】:

    标签: android adapter android-adapter


    【解决方案1】:

    我很愚蠢 :),解决方案很简单,而不是传递字符串我只是传递了字符串数组...

    我的问题是我不知道我可以更改方法定义...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-19
      相关资源
      最近更新 更多