コード例 #1
0
        void HandleListRecycling(object sender, AbsListView.RecyclerEventArgs e)
        {
            var favView = e.View as FavoriteView;

            if (favView == null)
            {
                return;
            }
            favView.ClearMap();
        }
コード例 #2
0
        /// <summary>
        /// Raises the recycling event.
        /// </summary>
        /// <remarks>
        /// This functions is called, when a list entry is removed from screen.
        /// So it is possible to release the memory on heap, which is occupied
        /// by the bitmap.
        /// </remarks>
        /// <param name="sender">Sender.</param>
        /// <param name="e">E.</param>
        void OnRecycling(object sender, AbsListView.RecyclerEventArgs e)
        {
            ImageView iv = e.View.FindViewById <ImageView>(Resource.Id.imageIcon);

            // if there is a image view, than release the memory
            if (iv != null)
            {
                iv.SetImageBitmap(null);
            }
        }