GraphView is not updated when new data is added

前端 未结 3 1555
傲寒
傲寒 2021-01-16 23:18

I have a GraphView that is not updated when new data is added, it changes the Y value to accommodate for the new data, but it doesn\'t draw them, here is the co

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-16 23:49

    Right now its chafing values but not changing UI, because you need to do such UI update operations in separate thread. You need to place all your code which is inside onClick in Thread/Runnable. Create Thread object inside onClick & place that code.

    Refer below link :

    http://karanbalkar.com/2014/05/display-graphs-using-graphview-in-android/

提交回复
热议问题