android graph view laggy on huge data
问题 I wanted to plot real time data via http://www.android-graphview.org/ for data acquired in a Bluetooth thread. Thread code: InputStream tmpIn = mSocket.getInputStream(); while (true) { try { BufferedReader r = new BufferedReader(new InputStreamReader(tmpIn)); String line; while ((line = r.readLine()) != null) { final String tmp = line; runOnUiThread(new Runnable() { @Override public void run() { addData(Integer.parseInt(tmp)); } }); } } catch (IOException e) { Log.e("BT", "BtConnectionThread