Hi Pals, I tried to set the visibility to invisible, but still I can see an empty line in the list, so I change a bit and worked according to my need, so it’s worth sharing if someone needs a similar result like mine.
I use List as a source. My requirement was to skip a few applications, so I did it, I removed this application from the list and the modified dataset
public AppListAdapter(Context context, List<ApplicationInfo> appList) { this.context = context; this.appList = appList; inflater = LayoutInflater.from(context); localStorage = new LocalStorage(context); pm = context.getPackageManager(); } @Override public View getView(int position, View convertView, ViewGroup parent) { if (convertView == null) convertView = inflater.inflate(R.layout.applist_item, parent, false);
Lines of concern
appList.remove (position);
notifyDataSetChanged ();
Your suggestions and corrections are always welcome. AzmatHunzai
source share