ListViews processes the views, which means that first the core set of list entries is pumped from XML. When you scroll down, one list entry is hidden at the top, and the bottom is displayed at the bottom. At this point, getView() is called with a nonzero argument to convertView , because the already oversized view is reused.
In your case, this means that the entire inflation / adjustment layout is skipped ( if (v == null) tree). Which is good, basically all you have to do is update the timestamp in the second section of if ( o != null ).
It should contain something similar to this, as with text comments:
CustomAnalogClock customAC = (CustomAnalogClock) v.findViewById(R.id.yourclockid); customAC.setTime(o.getOrderTime());
This means that you must assign an identifier (using setId() ) for your view, adding it to the layout, and also have a setTime() method ready.
user658042
source share