ListView not showing data in App Widget

后端 未结 2 484
再見小時候
再見小時候 2021-01-21 14:13

I\'m trying to implement a simple collection widget for my application, i\'m trying to show a ListView inside a widget but the ListView is stuck at Loa

相关标签:
2条回答
  • 2021-01-21 14:51

    Change the return count of getViewTypeCount to 1.

    getViewTypeCount is the number of types of Views that will be returned by the factory.

     @Override
        public int getViewTypeCount() {
            return 1;
        }
    
    0 讨论(0)
  • 2021-01-21 14:59

    I had same problem because I put custom view in list row, try to remove them if you have.

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