while creating a custom Adapter, i override getView method. here(code below for recyling views), i don't understand how LayoutInflater.from(getContext()).inflate(R.layout.list_item,parent,false) is working.i understand the need of first and second parameter but why are we using the thrid parameter?

public View getView(int position, View convertView, ViewGroup parent) {
    View listItemView = convertView;
       if (listItemView == null) {
            listItemView = LayoutInflater.from(getContext()).inflate(
                    R.layout.list_item, parent, false);

0 Answers