Search code examples
androiddragandroid-4.2-jelly-beanandroid-2.3-gingerbreadmotionevent

getHistorySize() always "0"


For ACTION_MOVE events, I'm obtaining the history size by calling event.getHistorySize() everything works perfectly on my Galaxy Nexus running Jellybean but on my LG Optimus 3D running Gingerbread, the history size is always "0". Does anyone know why this is? Did something change between 2.3 and 4.2?


Solution

  • Well since no one seems to have an answer to this, I'm just gonna explain the work around I had to do. On every ACTION_MOVE event, I simply stored the coordinates into an array myself, and then in upcoming ACTION_MOVE events instead of getting the coordinates from the event history, I just took them from the array. It's a straight forward work around, but the reasons as to why the issue was happening in the first place is still unclear.