Homescreen widget, listView shows “Loading”

早过忘川 提交于 2019-12-05 00:01:28
Chuy47

This answer helped me https://stackoverflow.com/a/23122006/2051381

I had to return 1 instead of 0 from the method getViewTypeCount() of my remoteViewsFactory class

Check if you are using a non-supported view.

In my case, I was using View in my layout as a divider. and didn't realize it's not one of the supported views.

I just removed it and the widget behaved as expected.

I had to remove

android:minHeight="?attr/dropdownListPreferredItemHeight"

from the layout of the list item to make this work

I also came here to say this: I set the background of the list item to
?attr/selectableitembackground

If someone having the same issue like this one and if you're using a custom launcher try to use the default launcher instead.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!