diff --git a/ui/list-view/list-view.android.ts b/ui/list-view/list-view.android.ts index ab817c6d3..b8d37f9a5 100644 --- a/ui/list-view/list-view.android.ts +++ b/ui/list-view/list-view.android.ts @@ -34,7 +34,6 @@ export class ListView extends common.ListView { private _android: android.widget.ListView; public _realizedItems = {}; private _androidViewId: number; - public _attachStateChangeListener: android.view.View.OnAttachStateChangeListener; public _createUI() { this._android = new android.widget.ListView(this._context); @@ -89,28 +88,6 @@ export class ListView extends common.ListView { } } })); - - this._attachStateChangeListener = new android.view.View.OnAttachStateChangeListener({ - get owner() { - return that.get(); - }, - - onViewAttachedToWindow: function (view: android.view.View) { - // - }, - onViewDetachedFromWindow: function (androidView: android.view.View) { - var owner = that.get(); - if (!owner) { - return; - } - - var view: viewModule.View = this.owner._realizedItems[androidView.hashCode()]; - if (!view) { - return; - } - view.onUnloaded(); - } - }); } get android(): android.widget.ListView { @@ -234,10 +211,6 @@ class ListViewAdapter extends android.widget.BaseAdapter { } } - if (!this._listView._realizedItems[convertView.hashCode()]) { - convertView.addOnAttachStateChangeListener(this._listView._attachStateChangeListener); - } - this._listView._realizedItems[convertView.hashCode()] = args.view; // cache the realized index (used to raise the ItemLoading event upon scroll stop) args.view[REALIZED_INDEX] = index; diff --git a/ui/list-view/list-view.ios.ts b/ui/list-view/list-view.ios.ts index 71a778e3f..ef253a8bf 100644 --- a/ui/list-view/list-view.ios.ts +++ b/ui/list-view/list-view.ios.ts @@ -21,14 +21,6 @@ class ListViewCell extends UITableViewCell { static new(): ListViewCell { return super.new(); } - - public removeFromSuperview(): void { - super.removeFromSuperview(); - var view: view.View = (this).view; - if (view) { - view.onUnloaded(); - } - } } function notifyForItemAtIndex(listView: definition.ListView, cell: any, eventName: string, indexPath: NSIndexPath) {