videoLoadViewModel.getList_of_Images(getActivity()).observe(getViewLifecycleOwner(), new Observer<ArrayList>() { @Override public void onChanged(ArrayList strings) {
if (strings==null) {
recyclerView.setVisibility(View.INVISIBLE);
textNoVideo.setVisibility(View.VISIBLE);
} else {
textNoVideo.setVisibility(View.INVISIBLE);
recyclerView.setVisibility(View.VISIBLE);
VideoShowAdaptor videoShowAdaptor = new VideoShowAdaptor(strings, getContext());
recyclerView.setAdapter(videoShowAdaptor);
videoShowAdaptor.notifyDataSetChanged();
}
}
});
Aucun commentaire:
Enregistrer un commentaire