public override int GetItemPosition ( Java.Lang.Object item ) { ObjectJavaBox <Tuple <ViewGroup , Page , int>> objectJavaBox = ( ObjectJavaBox <Tuple <ViewGroup , Page , int>> ) item; Element parent = objectJavaBox.Instance.Item2.Parent; if ( parent == null ) { return -2; } var num = ( ( CarouselPage ) parent ).Children.IndexOf ( ( ContentPage ) objectJavaBox.Instance.Item2 ); if ( num == 1 ) { return -2; } if ( num == objectJavaBox.Instance.Item3 ) { return -1; } objectJavaBox.Instance = new Tuple <ViewGroup , Page , int> ( objectJavaBox.Instance.Item1 , objectJavaBox.Instance.Item2 , num ); return num; }
public override void DestroyItem ( Android.Views.View container , int position , Java.Lang.Object item ) { ObjectJavaBox <Tuple <ViewGroup , Page , int>> objectJavaBox = ( ObjectJavaBox <Tuple <ViewGroup , Page , int>> ) item; GetRenderer ( objectJavaBox.Instance.Item2 ).ViewGroup.RemoveFromParent (); objectJavaBox.Instance.Item1.RemoveFromParent (); }