0

I have three kind of layouts in my list.

My problem is that only two kinds are showing, when the list is shown at the beginning. So when I scroll down, I have these two layouts ready to be converted and provide a smooth scroll but when the third kind of layout arrive, I don't have a converted layout for it and it causes a small jitter.

My question: Is there a why to pre load (or pre inflate) the layouts so they will be ready for converting in the getView()?

Thanks!

Dhasneem
  • 4,037
  • 4
  • 33
  • 47
roiberg
  • 13,629
  • 12
  • 60
  • 91
  • You should override `getViewTypeCount` and `getItemViewType` correctly. You can find a simple example in my answer: http://stackoverflow.com/a/11983375/427225 – vortexwolf Jul 17 '13 at 18:37
  • Your answer works only after each kind off view was already shown on screen. isn't it? – roiberg Jul 18 '13 at 06:42
  • @roilberg it chooses a view before displaying it. If you override the methods which I mentioned in my first comment, the `convertView` parameter will have a correct type. – vortexwolf Jul 18 '13 at 15:20
  • 1
    That small delay shouldn't happen , maybe you're doing too much when building that specific row. – user Jul 27 '13 at 09:46

0 Answers0