onGetViewFactory only called once for multiple widgets

后端 未结 2 1962
梦谈多话
梦谈多话 2020-12-10 04:07

I have an appwidget which uses ListView. I have created a class that extends RemoteViewsService:

public class AppWidgetService ext         


        
2条回答
  •  猫巷女王i
    2020-12-10 04:58

    Based on the above description another trick you can do if you are setting intent extra other than string could be:

    Random random = new Random();
    intent.setType(String.valueOf(random.nextInt(1000)));
    

    This will invoke a call to onGetViewFactory();

提交回复
热议问题