Наследование: Android.OS.Handler
Пример #1
0
 public static void Release(Activity activity)
 {
     if (sManagers != null)
     {
         MsgManager manager = sManagers[activity];
         sManagers.Remove(activity);
         if (manager != null)
         {
             manager.ClearAllMsg();
         }
     }
 }
Пример #2
0
 public static MsgManager ObTain(Activity activity)
 {
     if (sManagers == null)
     {
         sManagers = new Dictionary<Activity, MsgManager>();
     }
     MsgManager manager = null;
     if (sManagers.ContainsKey(activity))
     {
         manager = sManagers[activity];
     }
     if (manager == null)
     {
         manager = new MsgManager();
         EnsureReleaseOnDestroy(activity);
         sManagers.Add(activity, manager);
     }
     return manager;
 }
Пример #3
0
        public static MsgManager ObTain(Activity activity)
        {
            if (sManagers == null)
            {
                sManagers = new Dictionary <Activity, MsgManager>();
            }
            MsgManager manager = null;

            if (sManagers.ContainsKey(activity))
            {
                manager = sManagers[activity];
            }
            if (manager == null)
            {
                manager = new MsgManager();
                EnsureReleaseOnDestroy(activity);
                sManagers.Add(activity, manager);
            }
            return(manager);
        }
Пример #4
0
 public void OnActivityDestroyed(Android.App.Activity activity)
 {
     MsgManager.Release(activity);
 }
Пример #5
0
 public static void CancelAll(Activity activity)
 {
     MsgManager.Release(activity);
 }
Пример #6
0
 public static void CancelAll()
 {
     MsgManager.ClearAll();
 }
Пример #7
0
 public void Cancel()
 {
     MsgManager.ObTain(mActivity).ClearMsg(this);
 }
Пример #8
0
 public void Dismiss()
 {
     MsgManager.ObTain(mActivity).RemoveMsg(this);
 }
Пример #9
0
        public void Show()
        {
            MsgManager manager = MsgManager.ObTain(mActivity);

            manager.Add(this);
        }