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