use of com.amaze.filemanager.adapters.AppsRecyclerAdapter in project AmazeFileManager by TeamAmaze.
the class AppsListFragment method onLoadFinished.
@Override
public void onLoadFinished(@NonNull Loader<List<AppDataParcelable>> loader, List<AppDataParcelable> data) {
getSpinner().setVisibility(View.GONE);
if (data.isEmpty()) {
getRecyclerView().setVisibility(View.GONE);
rootView.findViewById(R.id.empty_text_view).setVisibility(View.VISIBLE);
} else {
appDataParcelableList = new ArrayList<>(data);
List<AppDataParcelable> adapterList = new ArrayList<>();
for (AppDataParcelable appDataParcelable : data) {
if (!showSystemApps && appDataParcelable.isSystemApp()) {
continue;
}
adapterList.add(appDataParcelable);
}
adapter = new AppsRecyclerAdapter(this, modelProvider, false, this, adapterList);
getRecyclerView().setVisibility(View.VISIBLE);
getRecyclerView().setAdapter(adapter);
}
}
Aggregations