I have a listview and i inflate the first position with a layout and every other position i do another inflation with another layout. I can do that by checking every time in getView, but as you can imagine this is not very efficient.
Can you share me your thoughts to get that result by having this pattern? (This don't get me the correct result(cause after 4-5 positions, depending of the number of positions inflated the first time, i get the layout.inside_list_2 on other positions too.)
if (convertView == null) {
if (position == 0)
convertView = mInflater.inflate(R.layout.inside_list_2,
parent, false);
else
convertView = mInflater.inflate(R.layout.inside_list, null);
}
else{
holder=(ViewHolder)convertView.getTag();
}