private void AddLog(string data) { Activity.RunOnUiThread(() => { lock (_lockObject) { _listViewData.Add(data); if (_adapter.Count == 11) { _listViewData.RemoveAt(0); } _adapter.NotifyDataSetChanged(); } }); }
private void LoadData(IEnumerable <string> data) { Activity.RunOnUiThread(() => { lock (_lockObject) { listViewData.Clear(); foreach (var item in data) { listViewData.Add(item); } adapter.NotifyDataSetChanged(); } }); }