public void Dispose() { if (calendar != null) { calendar.Dispose(); calendar = null; } if (mainLayout != null) { mainLayout.Dispose(); mainLayout = null; } if (proprtyOptionsLayout != null) { proprtyOptionsLayout.Dispose(); proprtyOptionsLayout = null; } if (dataAdapter != null) { dataAdapter.Dispose(); dataAdapter = null; } if (cultureSpinner != null) { cultureSpinner.Dispose(); cultureSpinner = null; } }
protected override void Dispose(bool disposing) { if (disposing && !_disposed) { _disposed = true; RemoveAllViews(); foreach (Page pageToRemove in Element.Children) { IVisualElementRenderer pageRenderer = Platform.GetRenderer(pageToRemove); if (pageRenderer != null) { pageRenderer.ViewGroup.RemoveFromParent(); pageRenderer.Dispose(); } } if (_bottomBar != null) { _bottomBar.SetOnTabClickListener(null); _bottomBar.Dispose(); _bottomBar = null; } if (_frameLayout != null) { _frameLayout.Dispose(); _frameLayout = null; } } base.Dispose(disposing); }
protected override void OnDetached() { try { _effect.Control = null; _effect = null; Container.LayoutChange -= LayoutChange; if (Container != null) { Container.Touch -= OnTouch; } if (Control != null) { Control.Touch -= OnTouch; } if (_viewOverlay != null) { Container.RemoveView(_viewOverlay); _viewOverlay.Pressed = false; _viewOverlay.Foreground = null; _viewOverlay.Dispose(); _ripple?.Dispose(); } } catch (ObjectDisposedException) { //suppress exception } _isHoverSupported = false; }
protected override void OnDetached() { if (IsDisposed) { return; } Container.RemoveView(viewOverlay); viewOverlay.Pressed = false; viewOverlay.Foreground = null; viewOverlay.Dispose(); Container.LayoutChange -= ViewOnLayoutChange; if (timer != null) { timer.Elapsed -= OnTimerEvent; timer.Stop(); timer.Close(); } if (EnableRipple) { ripple?.Dispose(); } View.Touch -= OnTouch; }
void UpdateEffectColor() { _view.Touch -= View_Touch; if (_layer != null) { _layer.Dispose(); _layer = null; } var color = AddCommand.GetEffectColor(Element); if (color == Xamarin.Forms.Color.Default) { return; } if (_useRipple) { _ripple.SetColor(getPressedColorSelector(color.ToAndroid())); } else { _layer = new FrameLayout(Container.Context); _layer.LayoutParameters = new ViewGroup.LayoutParams(-1, -1); _layer.SetBackgroundColor(color.ToAndroid()); _view.Touch += View_Touch; } }
void Destroy() { if (ShellItem != null) { UnhookEvents(ShellItem); } ((IShellController)ShellContext?.Shell)?.RemoveAppearanceObserver(this); if (_bottomSheetDialog != null) { _bottomSheetDialog.DismissEvent -= OnMoreSheetDismissed; _bottomSheetDialog?.Dispose(); _bottomSheetDialog = null; } _navigationArea?.Dispose(); _appearanceTracker?.Dispose(); _outerLayout?.Dispose(); if (_bottomView != null) { _bottomView?.SetOnNavigationItemSelectedListener(null); _bottomView?.Background?.Dispose(); _bottomView?.Dispose(); } _bottomView = null; _navigationArea = null; _appearanceTracker = null; _outerLayout = null; }
public void Dispose() { if (calendar != null) { calendar.Dispose(); calendar = null; } if (mainView != null) { mainView.Dispose(); mainView = null; } if (culturetxt != null) { culturetxt.Dispose(); culturetxt = null; } if (cultureSpinner != null) { cultureSpinner.Dispose(); cultureSpinner = null; } if (layoutParams1 != null) { layoutParams1.Dispose(); layoutParams1 = null; } if (separate != null) { separate.Dispose(); separate = null; } if (propertylayout != null) { propertylayout.Dispose(); propertylayout = null; } if (dataAdapter != null) { dataAdapter.Dispose(); dataAdapter = null; } if (localinfo != null) { localinfo.Dispose(); localinfo = null; } }
protected override void Dispose(bool disposing) { if (disposing && !_disposed) { _disposed = true; RemoveAllViews(); foreach (Page pageToRemove in Element.Children) { IVisualElementRenderer pageRenderer = Platform.GetRenderer(pageToRemove); if (pageRenderer != null) { pageRenderer.View.RemoveFromParent(); try { pageRenderer.Dispose(); } catch (Exception ex) { ; } } pageToRemove.PropertyChanged -= OnPagePropertyChanged; // pageToRemove.ClearValue (Platform.RendererProperty); } if (_badges != null) { _badges.Clear(); _badges = null; } if (_bottomBar != null) { _bottomBar.SetOnTabClickListener(null); _bottomBar.Dispose(); _bottomBar = null; } if (_frameLayout != null) { _frameLayout.Dispose(); _frameLayout = null; } /*if (Element != null) { * PageController.InternalChildren.CollectionChanged -= OnChildrenCollectionChanged; * }*/ } base.Dispose(disposing); }
public void Dispose() { if (calendar != null) { calendar.Dispose(); calendar = null; } if (mainView != null) { mainView.Dispose(); mainView = null; } }
protected override void Dispose(bool disposing) { if (disposing && !_disposed) { _disposed = true; RemoveAllViews(); foreach (Page pageToRemove in Element.Children) { IVisualElementRenderer pageRenderer = Platform.GetRenderer(pageToRemove); if (pageRenderer != null) { #pragma warning disable CS0618 // Type or member is obsolete pageRenderer.ViewGroup.RemoveFromParent(); #pragma warning restore CS0618 // Type or member is obsolete pageRenderer.Dispose(); } pageToRemove.PropertyChanged -= OnPagePropertyChanged; // pageToRemove.ClearValue (Platform.RendererProperty); } if (_badges != null) { _badges.Clear(); _badges = null; } if (_bottomBar != null) { _bottomBar.SetOnTabClickListener(null); _bottomBar.Dispose(); _bottomBar = null; } if (_frameLayout != null) { _frameLayout.Dispose(); _frameLayout = null; } /*if (Element != null) { * PageController.InternalChildren.CollectionChanged -= OnChildrenCollectionChanged; * }*/ } base.Dispose(disposing); }
public void Dispose() { if (calendar != null) { calendar.Dispose(); calendar = null; } if (dataAdapter != null) { dataAdapter.Dispose(); dataAdapter = null; } if (modeSpinner != null) { modeSpinner.Dispose(); modeSpinner = null; } if (mainView != null) { mainView.Dispose(); mainView = null; } if (separatorLayoutParams != null) { separatorLayoutParams.Dispose(); separatorLayoutParams = null; } if (separate != null) { separate.Dispose(); separate = null; } if (propertylayout != null) { propertylayout.Dispose(); propertylayout = null; } if (viewModetxt != null) { viewModetxt.Dispose(); viewModetxt = null; } }
protected override void OnDetached() { if (effect?.Element == null) { return; } try { if (accessibilityManager != null) { accessibilityManager.RemoveAccessibilityStateChangeListener(accessibilityListener); accessibilityManager.RemoveTouchExplorationStateChangeListener(accessibilityListener); accessibilityListener.Dispose(); accessibilityManager = null; accessibilityManager = null; } if (View != null) { View.LayoutChange -= LayoutChange; View.Touch -= OnTouch; View.Click -= OnClick; } effect.Element = null; effect = null; if (viewOverlay != null) { if (Group != null) { Group.RemoveView(viewOverlay); } viewOverlay.Pressed = false; viewOverlay.Foreground = null; viewOverlay.Dispose(); ripple?.Dispose(); } } catch (ObjectDisposedException) { // Suppress exception } isHoverSupported = false; }
protected override void OnDetached() { if (_effect?.Control == null) { return; } try { if (_accessibilityManager != null) { _accessibilityManager.RemoveAccessibilityStateChangeListener(_accessibilityListener); _accessibilityManager.RemoveTouchExplorationStateChangeListener(_accessibilityListener); _accessibilityListener.Dispose(); _accessibilityManager = null; _accessibilityManager = null; } if (View != null) { View.LayoutChange -= LayoutChange; View.Touch -= OnTouch; View.Click -= OnClick; } _effect.Control = null; _effect = null; if (_viewOverlay != null) { if (Group != null) { Group.RemoveView(_viewOverlay); } _viewOverlay.Pressed = false; _viewOverlay.Foreground = null; _viewOverlay.Dispose(); _ripple?.Dispose(); } } catch (ObjectDisposedException) { //suppress exception } _isHoverSupported = false; }
protected override void OnDetached() { if (IsDisposed) { return; } Container.RemoveView(_viewOverlay); _viewOverlay.Pressed = false; _viewOverlay.Foreground = null; _viewOverlay.Dispose(); Container.LayoutChange -= ViewOnLayoutChange; if (EnableRipple) { _ripple?.Dispose(); } TouchCollector.Delete(View, OnTouch); }
void RemoveRipple() { if (Element is Layout) { var viewgrp = _view as ViewGroup; viewgrp.RemoveOnLayoutChangeListener(_rippleListener); _rippleListener.Dispose(); viewgrp.RemoveView(_rippleOverlay); _rippleOverlay.Dispose(); _rippleOverlay = null; } else { _view.Background = _orgDrawable; _orgDrawable = null; } _ripple?.Dispose(); _ripple = null; }
protected override void Dispose(bool disposing) { if (disposing && !disposed) { disposed = true; RemoveAllViews(); foreach (var pageToRemove in Element.Children) { var pageRenderer = Platform.GetRenderer(pageToRemove); if (pageRenderer != null) { pageRenderer.ViewGroup.RemoveFromParent(); pageRenderer.Dispose(); } // pageToRemove.ClearValue (Platform.RendererProperty); } if (bottomBar != null) { bottomBar.SetOnTabClickListener(null); bottomBar.Dispose(); bottomBar = null; } if (frameLayout != null) { frameLayout.Dispose(); frameLayout = null; } /*if (Element != null) { * PageController.InternalChildren.CollectionChanged -= OnChildrenCollectionChanged; * }*/ } base.Dispose(disposing); }
// Use OnDestory become OnDestroyView may fire before events are completed. public override void OnDestroy() { UnhookEvents(ShellItem); if (_bottomView != null) { _bottomView?.SetOnNavigationItemSelectedListener(null); _bottomView?.Background?.Dispose(); _bottomView?.Dispose(); _bottomView = null; _navigationArea?.Dispose(); _navigationArea = null; _appearanceTracker?.Dispose(); _appearanceTracker = null; _outerLayout?.Dispose(); _outerLayout = null; } ((IShellController)ShellContext.Shell).RemoveAppearanceObserver(this); base.OnDestroy(); }
public void CleanUp() { _parent.RemoveView(_overlay); _overlay.Dispose(); }
public void Dispose() { if (calendar != null) { calendar.DrawMonthCell -= Calendar_DrawMonthCell; calendar.Dispose(); calendar = null; } if (viewModetxt != null) { viewModetxt.Dispose(); viewModetxt = null; } if (modeSpinner != null) { modeSpinner.Dispose(); modeSpinner = null; } if (spaceAdder1 != null) { spaceAdder1.Dispose(); spaceAdder1 = null; } if (spaceAdder2 != null) { spaceAdder2.Dispose(); spaceAdder2 = null; } if (minDate != null) { minDate.Dispose(); minDate = null; } if (maxDate != null) { maxDate.Dispose(); maxDate = null; } if (minPick != null) { minPick.Dispose(); minPick = null; } if (maxPick != null) { maxPick.Dispose(); maxPick = null; } if (minDateButton != null) { minDateButton.Dispose(); minDateButton = null; } if (maxDateButton != null) { maxDateButton.Dispose(); maxDateButton = null; } if (mainView != null) { mainView.Dispose(); mainView = null; } if (propertylayout != null) { propertylayout.Dispose(); propertylayout = null; } if (minDatePicker != null) { minDatePicker.Dispose(); minDatePicker = null; } if (maxDatePicker != null) { maxDatePicker.Dispose(); maxDatePicker = null; } if (underMaxSeparatorLayoutParam != null) { underMaxSeparatorLayoutParam.Dispose(); underMaxSeparatorLayoutParam = null; } if (minMaxSeparatorLayoutParam != null) { minMaxSeparatorLayoutParam.Dispose(); minMaxSeparatorLayoutParam = null; } if (dataAdapter != null) { dataAdapter.Dispose(); dataAdapter = null; } if (underMaxSeparator != null) { underMaxSeparator.Dispose(); underMaxSeparator = null; } if (minMaxSeparator != null) { minMaxSeparator.Dispose(); minMaxSeparator = null; } }
public void Dispose() { if (sfSchedule != null) { sfSchedule.CellTapped -= SfSchedule_CellTapped; sfSchedule.CellDoubleTapped -= SfSchedule_DoubleTapped; sfSchedule.VisibleDatesChanged -= SfSchedule_VisibleDatesChanged; sfSchedule.Dispose(); sfSchedule = null; } if (mainLayout != null) { mainLayout.Dispose(); mainLayout = null; } if (propertylayout != null) { propertylayout.Dispose(); propertylayout = null; } if (linearLayout != null) { linearLayout.Dispose(); linearLayout = null; } if (editor != null) { if (editor.SaveButton != null) { editor.SaveButton.Click -= SaveButton_Click; editor.SaveButton.Dispose(); editor.SaveButton = null; } if (editor.CancelButton != null) { editor.CancelButton.Click -= CancelButton_Click; editor.CancelButton.Dispose(); editor.CancelButton = null; } editor.Dispose(); editor = null; } if (scheduleCustomHeader != null) { if (scheduleCustomHeader.ScheduleCalendar != null) { scheduleCustomHeader.ScheduleCalendar.Click -= ScheduleCalendar_Click; scheduleCustomHeader.ScheduleCalendar.Dispose(); scheduleCustomHeader.ScheduleCalendar = null; } if (scheduleCustomHeader.SchedulePlus != null) { scheduleCustomHeader.SchedulePlus.Click -= EditorLayout_Click; scheduleCustomHeader.SchedulePlus.Dispose(); scheduleCustomHeader.SchedulePlus = null; } if (scheduleCustomHeader.ScheduleOption != null) { scheduleCustomHeader.ScheduleOption.Click -= ScheduleOption_Click; scheduleCustomHeader.ScheduleOption.Dispose(); scheduleCustomHeader.ScheduleOption = null; } scheduleCustomHeader.Dispose(); scheduleCustomHeader = null; } if (viewOptionLayout != null) { if (viewOptionLayout.Day != null) { viewOptionLayout.Day.Click -= Day_Click; viewOptionLayout.Day.Dispose(); viewOptionLayout.Day = null; } if (viewOptionLayout.Week != null) { viewOptionLayout.Week.Click -= Week_Click; viewOptionLayout.Week.Dispose(); viewOptionLayout.Week = null; } if (viewOptionLayout.Workweek != null) { viewOptionLayout.Workweek.Click -= Workweek_Click; viewOptionLayout.Workweek.Dispose(); viewOptionLayout.Workweek = null; } if (viewOptionLayout.Month != null) { viewOptionLayout.Month.Click -= Month_Click; viewOptionLayout.Month.Dispose(); viewOptionLayout.Month = null; } viewOptionLayout.Dispose(); viewOptionLayout = null; } if (minTimeSubjectCollection != null) { minTimeSubjectCollection.Clear(); minTimeSubjectCollection = null; } if (minStartTimeCollection != null) { minStartTimeCollection.Clear(); minStartTimeCollection = null; } }
public void Dispose() { if (calendar != null) { calendar.DrawMonthCell -= Calendar_DrawMonthCell; calendar.Dispose(); calendar = null; } if (modeSpinner != null) { modeSpinner.Dispose(); modeSpinner = null; } if (dataAdapter != null) { dataAdapter.Dispose(); dataAdapter = null; } if (minPick != null) { minPick.Dispose(); minPick = null; } if (maxPick != null) { maxPick.Dispose(); maxPick = null; } if (mainLayout != null) { mainLayout.Dispose(); mainLayout = null; } if (proprtyOptionsLayout != null) { proprtyOptionsLayout.Dispose(); proprtyOptionsLayout = null; } if (minDatePicker != null) { minDatePicker.Dispose(); minDatePicker = null; } if (maxDatePicker != null) { maxDatePicker.Dispose(); maxDatePicker = null; } if (minDateButton != null) { minDateButton.Dispose(); minDateButton = null; } if (maxDateButton != null) { maxDateButton.Dispose(); maxDateButton = null; } }
public void Dispose() { if (sfschedule != null) { sfschedule.Dispose(); sfschedule = null; } if (propertylayout != null) { propertylayout.Dispose(); propertylayout = null; } if (monthViewLayout != null) { monthViewLayout.Dispose(); monthViewLayout = null; } if (otherviewsLayout != null) { otherviewsLayout.Dispose(); otherviewsLayout = null; } if (workHourRangeSlider != null) { workHourRangeSlider.RangeChanged -= WorkHour_rangeSlider_RangeChanged; workHourRangeSlider.Dispose(); workHourRangeSlider = null; } if (showWeekNumber != null) { showWeekNumber.CheckedChange -= Show_week_number_CheckedChange; showWeekNumber.Dispose(); showWeekNumber = null; } if (workingHoursTxtBlock != null) { workingHoursTxtBlock.Dispose(); workingHoursTxtBlock = null; } if (showNonAccessibleBlockcheckBox != null) { showNonAccessibleBlockcheckBox.CheckedChange -= Show_Non_Accessible_Block_checkBox_CheckedChange; showNonAccessibleBlockcheckBox.Dispose(); showNonAccessibleBlockcheckBox = null; } if (showBlackoutDates != null) { showBlackoutDates.CheckedChange -= Show_Blackout_Dates_CheckedChange; showBlackoutDates.Dispose(); showBlackoutDates = null; } if (monthViewLayout != null) { monthViewLayout.Dispose(); monthViewLayout = null; } }