LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View convertView = inflater.inflate(R.layout.listview_item, parent, false); LayoutInflater inflater = LayoutInflater.from( parent.getContext() ); View convertView = inflater.inflate( R.layout.row_listview, null );