Custom ArrayAdapter in a ListFragment

前端 未结 1 386
天涯浪人
天涯浪人 2021-02-03 12:17

I\'m trying to create a custom ArrayAdapter to use for my ListFragment. Right now nothing is being displayed in the ListFragment except f

相关标签:
1条回答
  • 2021-02-03 12:32

    The solution is that getCount() was returning 0 for my ArrayAdapter. So I just used mAdapter.add(temp) and then mAdapter.notifyDataSetChanged() and it worked. I also had to change the line row = inflater.inflate(R.id.pager, parent, false); to row = inflater.inflate(R.layout.listview_row, parent, false);

    0 讨论(0)
提交回复
热议问题