'Hide' an item from the RecyclerView. Remove an item but allow the user to bring it back. The user must be able to bring all the removed items back. Open to a different approach to this.

[![enter image description here](https://i.stack.imgur.com/qwoLQ.jpg)](https://i.stack.imgur.com/qwoLQ.jpg)

The link above is a screenshot of the list. I want to be able to hide an item from the list (as seen in the image above), but still allow the user to bring all hidden items back onto the list.

Code for populating the list.

```
    //Method used to retrieve all installed applications
    private ArrayList<AppData> getInstalledPackages() {
        List<String> appsList = new ArrayList<>();
        ArrayList<AppData> appDataArrayList = new ArrayList<AppData>();
        AppInfoExtractor apkInfoExtractor = new AppInfoExtractor(this);
        appsList = apkInfoExtractor.GetAllInstalledApkInfo();
        if (appsList != null && appsList.size() > 0) {
            for (int i = 0; i < appsList.size(); i++) {

                AppData appData = new AppData();
                appData.setAppName(apkInfoExtractor.GetAppName(appsList.get(i)));
                appData.setPackageName(appsList.get(i));
                Version version = new Version();
                version.setVersionName(apkInfoExtractor.getVersionName(appsList.get(i)));
                version.setVersionCode(apkInfoExtractor.getAppVersionCode(appsList.get(i)));
                List<String> grantedPermissions = getPermissionsForPackage(appsList.get(i));
                List<String> grantedPermissionsShort = getShortPermissionStrings(grantedPermissions);
                version.setPermissions(grantedPermissionsShort);
                ArrayList<Version> versions = new ArrayList<Version>();
                versions.add(version);
                appData.setVersions(versions);
                appDataArrayList.add(appData);
            }
        }
        return appDataArrayList;
    }

```

Code for the List adapter.

```
    @Override
    public void onBindViewHolder(ViewHolder viewHolder, int position) {

        AppInfoExtractor apkInfoExtractor = new AppInfoExtractor(context1);

        final String ApplicationPackageName = (String) stringList.get(position);
        final String ApplicationLabelName = apkInfoExtractor.GetAppName(ApplicationPackageName);
        Drawable drawable = apkInfoExtractor.getAppIconByPackageName(ApplicationPackageName);

        viewHolder.textView_App_Name.setText(ApplicationLabelName);

        viewHolder.textView_App_Package_Name.setText(ApplicationPackageName);
        viewHolder.tv_version_name.setText("Version Name: " + apkInfoExtractor.getVersionName(ApplicationPackageName));
        viewHolder.tv_version_code.setText("Version Code: " + apkInfoExtractor.getAppVersionCode(ApplicationPackageName));

        viewHolder.imageView.setImageDrawable(drawable);

        //Adding click listener on CardView to open clicked application directly from here .
        viewHolder.cardView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent perm = new Intent(context1, AppDetailActivity.class);
                perm.putExtra("PACKAGE_NAME", ApplicationPackageName);
                perm.putExtra("APP_NAME", ApplicationLabelName);
                context1.startActivity(perm);
            }
        });
    }

```