JJOE64 Android graphview reset function -
i've been trying make "realtime" graph using reset function reset data, trying prepare myself using external dataset. here's code;
class mytimertask extends timertask { int y = 0; public void run() { random rn = new random(); int loopy = 0; int testvoor2 = rn.nextint(5)+1; testarraylist.add(testvoor2); tempservo2.resetdata(new datapoint[] { (integer object: testarraylist){ new datapoint(object,loopy); loopy = loopy + 1; }; }); string testvoor = integer.tostring(rn.nextint(100)+1); log.d("temperatuur", testvoor); } }
as can see using loop in function doesnt work, , alternative can think of using case call different versions of reset functions on basis of length of array list. seems incredibly work intensive (not mention incredible spaghetti code) i'm skeptical there isnt easier way.
thanks in advance
found out problem wasnt in part of code threading problem.
Comments
Post a Comment