Android support v4 SwipeRefreshLayout empty view issue

后端 未结 9 1235
耶瑟儿~
耶瑟儿~ 2021-01-01 18:01

SwipeRefresh is not working after setting an empty view for listview which is the only child of a SwipeRefresh layout. How to solve this issue?

9条回答
  •  青春惊慌失措
    2021-01-01 18:52

    I have tried UI hack but it didn't work, the only solution worked is set adapter. pass empty value make sure the value will not be null.

    NotificationListAdapter notificationListAdapter;
    notificationListAdapter = new NotificationListAdapter(mContext,notificationResponse);
    reCycleViewNotificationList.setAdapter(notificationListAdapter); // weather ListView or RecyclerView
    

提交回复
热议问题