コード例 #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 = "******";
        }
コード例 #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();
         });
     }
 }
コード例 #3
0
ファイル: BaseFragment.cs プロジェクト: Berkays/DaVinci-App
 protected void RunOnUiThread(Action action)
 {
     parentActivity.RunOnUiThread(action);
 }
コード例 #4
0
 protected void RunOnUIThread(System.Action action)
 {
     parentActivity.RunOnUiThread(action);
 }