/// <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 = "******";
        }
Esempio n. 2
0
 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();
         });
     }
 }
Esempio n. 3
0
 protected void RunOnUiThread(Action action)
 {
     parentActivity.RunOnUiThread(action);
 }
Esempio n. 4
0
 protected void RunOnUIThread(System.Action action)
 {
     parentActivity.RunOnUiThread(action);
 }