• buzzlightyear's avatar
    SensorListAdapter now uses a ViewHolder for both of the textviews (sensor... · 11fef4f4
    buzzlightyear authored
    SensorListAdapter now uses a ViewHolder for both of the textviews  (sensor name and sensor value) for each item in the list. Using a ViewHolder really optimizes the code, by limiting the number of inflations of the Layout and the number of getViewById calls. For our list, it's not so bad, because there are only like 10 sensors, but once you get up to 100s of sensors, calling getViewById really is exhaustive.
    
    aSensor now has a getLastValueString and getLastValue float methods. Their names explain what they do, the float methods returns the number values, and the string method returns the string (most for TextViews).
    11fef4f4