i have a Adapter that extends BaseAdapter, i had mapped Items sucessfully but i wanted if the filename ends with “.php” it didn’t show any data.
i am using following code for this
public View getView(int position, View convertView, ViewGroup parent) {
View row=convertView;
row = inflater.inflate(R.layout.custom_row_view, parent, false);
if(data.get(position).name.endsWith(".php"))
row.setVisibility(View.GONE);
}
But this will leave that blank space in that listview.
Is there any way i made check on listView that it didn’t mapped that data which name ends with “.php”, don’t want blank screen at this point.
Since you’re already extending
BaseAdapter, in whichever methods you add items, go through them first and don’t add the ones that you don’t want.