/// <summary> /// Creates adapter with all messages. Messages are ordered by created date. /// </summary> /// <param name="activity">Activity from which is adapter created</param> /// <param name="messages">Ordered list of messages.</param> public MessageItemAdapter(BaseActivity activity, List <ChatMessage> messages) : base() { _items = messages; _activity = activity; _imagesService = ImageService.Instance; // refresh list after all images downloaded _imagesService.ImageDownloaded += (sender, e) => _activity.RunOnUiThread(NotifyDataSetChanged); _userName = "******"; }
public void OnServiceConnected(ComponentName name, IBinder service) { Log.Debug(TAG, $"OnServiceConnected {name.ClassName}"); if (service != null) { baseActivity.GpsServiceBinder = service as GPSServiceBinder; baseActivity.GpsServiceBound = true; baseActivity.RunOnUiThread(() => { baseActivity.GpsServiceConnected(); }); } }
protected void RunOnUiThread(Action action) { parentActivity.RunOnUiThread(action); }
protected void RunOnUIThread(System.Action action) { parentActivity.RunOnUiThread(action); }