예제 #1
0
        private void AddLog(string data)
        {
            Activity.RunOnUiThread(() =>
            {
                lock (_lockObject)
                {
                    _listViewData.Add(data);

                    if (_adapter.Count == 11)
                    {
                        _listViewData.RemoveAt(0);
                    }

                    _adapter.NotifyDataSetChanged();
                }
            });
        }
예제 #2
0
        private void LoadData(IEnumerable <string> data)
        {
            Activity.RunOnUiThread(() =>
            {
                lock (_lockObject)
                {
                    listViewData.Clear();

                    foreach (var item in data)
                    {
                        listViewData.Add(item);
                    }

                    adapter.NotifyDataSetChanged();
                }
            });
        }