Commits

Luis Alberto Pérez García committed 20f0c64

Fixed problem causing returned bar index to be only 0 or -1, causing an
ArrayOutBounds error when any bar (except the first one) was tapped.

Comments (0)

Files changed (2)

HoloGraphLibrary/libs/android-support-v4.jar

Binary file removed.

HoloGraphLibrary/src/com/echo/holographlibrary/BarGraph.java

                 indexSelected = count;
             } else if (event.getAction() == MotionEvent.ACTION_UP){
                 if (r.contains((int)point.x,(int) point.y) && listener != null){
-                    listener.onClick(indexSelected);
+                    if (indexSelected > -1) listener.onClick(indexSelected);
+                    indexSelected = -1;
                 }
-                indexSelected = -1;
             }
             count++;
         }