Open meness opened 9 years ago
ViewStub is null. I encountered the same when I tried setting a different Loading and LoadFailed Views. Once you set the empty view , you cannot set another view again because The stub is already inflated.
So this is a bug and should be fixed! because I must be able to set the layout dynamically. Thanks.
Any updates with this?
@firasalkafri Not yet :( @cymcsg Sir we're waiting for a big update. I'm using this library inside my very huge project and I really want to see regular updates. Thanks.
@alirezaaa It's very kind of you. As I am really too busy these days I can hardly find enough time to improve the library regularly . I'll try to fix bugs and enhance the library.
@alirezaaa try use UltimateRecyclerView.getEmptyView()
and remove its children view, then inflate and add your custom view into its parent view
View view=ultimateRecyclerView.getEmptyView();
if(view!=null){
ViewGroup viewGroup= ((ViewGroup) view.getParent());
viewGroup.removeView(view);
viewGroup.addView(LayoutInflater.from(viewGroup.getContext()).inflate(errorViewRsid,null));
}else{
ultimateRecyclerView.setEmptyView();
}
Hi,
I think you're setting something null and because of that, Android throws an exception.
The complete trace is:
The error was thrown because of following line that I've set.
And the used layout content is: