示例#1
0
        public void RemoveFromWindow()
        {
            if (Parent is ViewGroup parent)
            {
                parent.RemoveView(this);
            }


            if (_bitmap != null)
            {
                _bitmap.Recycle();
                _bitmap = null;
            }

            _eraser           = null;
            _animationFactory = null;
            _canvas           = null;
            _handler          = null;

            if ((int)Build.VERSION.SdkInt < 16)
            {
                ViewTreeObserver.RemoveGlobalOnLayoutListener(this);
            }
            else
            {
                ViewTreeObserver.RemoveOnGlobalLayoutListener(this);
            }
            //mLayoutListener = null;

            _prefsManager?.Close();

            _prefsManager = null;
        }
示例#2
0
 /**
  * Static helper method for resetting all single use flags
  *
  * @param context
  */
 public static void ResetAll(Context context) => PrefsManager.ResetAll(context);
示例#3
0
 /**
  * Static helper method for resetting single use flag
  *
  * @param context
  * @param showcaseID
  */
 public static void ResetSingleUse(Context context, string showcaseId)
 => PrefsManager.ResetShowcase(context, showcaseId);
示例#4
0
 private void SingleUse(string showcaseId)
 {
     _singleUse    = true;
     _prefsManager = new PrefsManager(Context, showcaseId);
 }
示例#5
0
 public MaterialShowcaseSequence SingleUse(string sequenceId)
 {
     _singleUse    = true;
     _prefsManager = new PrefsManager(_activity, sequenceId);
     return(this);
 }