android - ListView Recycle mechanism -


I have been very well understood as a ListView recycle mechanism, but I do not understand one thing,

If I want to change the height of the list row, then it only works by determining the height by dynamically, for example:

  convertView.setLayoutParams (New AbsListView.LayoutParams (AbsListView.LayoutParams.FILL_PARENT, 80));   

If I define the height of the line layout in XML then it does not change, how is it related to the recycle system?

This is not only for list row height, I have seen many cases where the properties of XML are not working, but changing them works dynamically well, but how ?

I understand, it was a small mistake, I

  •   convertView = mInflater.inflate (R. Layout.drawer_list_item, tap, incorrect);   

    above the code was the main reason why the properties of XML were not working. Then I changed it to

      convertView = mInflater.inflate (R.layout.drawer_list_item, parent, wrong);   

    Now it is working as expected, sorry, but the recycle system has nothing to do with XML, I have lost it there.

  • Comments

    Popular posts from this blog

    java - ImportError: No module named py4j.java_gateway -

    python - Receiving "KeyError" after decoding json result from url -

    .net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -