Exemplo n.º 1
0
 protected override void Dispose(bool disposing)
 {
     _recyclerView.Dispose();
     _swipeRefreshLayout.Dispose();
     _dataSource.Dispose();
     base.Dispose(disposing);
 }
Exemplo n.º 2
0
 private void DisposeItems()
 {
     _content?.Dispose();
     _content = null;
     _close?.Dispose();
     _close = null;
     _resultsView?.Dispose();
     _resultsView = null;
     _resultsTxv?.Dispose();
     _resultsTxv = null;
     _orderId?.Dispose();
     _orderId = null;
     _checkBtn?.Dispose();
     _checkBtn      = null;
     _presenter     = null;
     _servicePoints = null;
     _spRecyclerView?.Dispose();
     _spRecyclerView = null;
     _mapFragment?.Dispose();
     _mapFragment = null;
     _viewIcon?.SetImageDrawable(null);
     _viewIcon.Dispose();
     _animationView?.Dispose();
     _receiver?.Dispose();
     _receiver = null;
     _connection?.Dispose();
     _connection = null;
 }
        protected override void OnDestroy()
        {
            base.OnDestroy();

            //Unbind events
            unlocker.Touch -= Unlocker_Touch;
            clearAll.Click -= BtnClearAll_Click;
            WallpaperPublisher.NewWallpaperIssued     -= Wallpaper_NewWallpaperIssued;
            CatcherHelper.NotificationListSizeChanged -= CatcherHelper_NotificationListSizeChanged;
            lockscreen.Touch -= Lockscreen_Touch;

            watchDog.Stop();
            watchDog.Elapsed -= WatchdogInterval_Elapsed;
            watchDog.Dispose();
            //Dispose Views
            //Views
            recycler.Dispose();
            unlocker.Dispose();
            clearAll.Dispose();
            lockscreen.Dispose();
            wallpaper.Background.Dispose();
            wallpaper.Dispose();

            //Dispose Fragments
            notificationFragment.Dispose();
            musicFragment.Dispose();
            clockFragment.Dispose();
            weatherFragment.Dispose();

            StopFloatingNotificationService();
        }
Exemplo n.º 4
0
        private void ReleaseRecyclerView()
        {
            recyclerView.RemoveItemDecoration(shadowDecoration);
            recyclerView.RemoveItemDecoration(dividerDecoration);
            recyclerView.RemoveOnItemTouchListener(itemTouchListener);

            recyclerView.GetAdapter().Dispose();
            recyclerView.Dispose();
            logAdapter = null;

            itemTouchListener.Dispose();
            dividerDecoration.Dispose();
            shadowDecoration.Dispose();
        }
Exemplo n.º 5
0
        void OnSelectDevice(object sender, IDevice device)
        {
            device.WhenConnected().Subscribe(result => Connected(result));

            device.Connect();
            this.device = device;
            Snackbar.Make(FindViewById <Android.Widget.LinearLayout>(Resource.Id.linearLayout), "Łączenie...", Snackbar.LengthIndefinite)
            .SetAction("Action", (View.IOnClickListener)null).Show();

            var grid = (FindViewById <Android.Widget.LinearLayout>(Resource.Id.linearLayout));

            grid.RemoveViewInLayout(recyclerView);
            recyclerView.Dispose();
        }
        protected virtual void CleanUpReferencesToViewOrContext()
        {
            recycler?.GetAdapter()?.Dispose();
            recycler?.Dispose();
            viewSwitcher = null;
            header       = null;
            emptyText    = null;

            if (loadMoreButton != null)
            {
                loadMoreButton.Click -= NextButon_Click;
            }

            loadMoreButton = null;
            LoadMoreClick  = null;
        }
        protected override void OnDestroy()
        {
            base.OnDestroy();
            ActivityLifecycleHelper.GetInstance().NotifyActivityStateChange(typeof(LockScreenActivity), ActivityStates.Destroyed);
            //Unbind events

            clearAll.Click -= BtnClearAll_Click;
            WallpaperPublisher.NewWallpaperIssued       -= Wallpaper_NewWallpaperIssued;
            CatcherHelper.NotificationListSizeChanged   -= CatcherHelper_NotificationListSizeChanged;
            WidgetStatusPublisher.OnWidgetStatusChanged += WidgetStatusPublisher_OnWidgetStatusChanged;
            lockscreen.Touch -= Lockscreen_Touch;

            watchDog.Stop();
            watchDog.Elapsed -= WatchdogInterval_Elapsed;
            watchDog.Dispose();
            //Dispose Views
            //Views
            recycler.Dispose();
            clearAll.Dispose();
            lockscreen.Dispose();

            viewPropertyAnimator.Dispose();
        }
Exemplo n.º 8
0
        protected override void OnDestroy()
        {
            base.OnDestroy();
            OnActivityStateChanged?.Invoke(null, new LockScreenLifecycleEventArgs {
                State = ActivityStates.Destroyed
            });
            //Unbind events

            OnActivityStateChanged -= LockScreenActivity_OnActivityStateChanged;
            //unlocker.Touch -= Unlocker_Touch;
            clearAll.Click -= BtnClearAll_Click;
            WallpaperPublisher.NewWallpaperIssued     -= Wallpaper_NewWallpaperIssued;
            CatcherHelper.NotificationListSizeChanged -= CatcherHelper_NotificationListSizeChanged;
            lockscreen.Touch -= Lockscreen_Touch;

            watchDog.Stop();
            watchDog.Elapsed -= WatchdogInterval_Elapsed;
            watchDog.Dispose();
            //Dispose Views
            //Views
            recycler.Dispose();
            //unlocker.Dispose();
            clearAll.Dispose();
            lockscreen.Dispose();
            //wallpaperView.Background?.Dispose();
            //wallpaperView = null;

            viewPropertyAnimator.Dispose();

            //Dispose Fragments
            notificationFragment.Dispose();
            musicFragment.Dispose();
            clockFragment.Dispose();
            weatherFragment.Dispose();
            livedisplayinfo?.Dispose();
        }
Exemplo n.º 9
0
 public void Dispose()
 {
     _recyclerView?.Dispose();
     _snapHelper?.Dispose();
 }