//@Override protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_dynamiclistview); DynamicListView listView = (DynamicListView)FindViewById(Resource.Id.activity_dynamiclistview_listview); listView.AddHeaderView(LayoutInflater.From(this).Inflate(Resource.Layout.activity_dynamiclistview_header, listView, false)); /* Setup the adapter */ Com.Nhaarman.ListviewAnimations.ArrayAdapter <string> adapter = new MyListAdapter(this); SimpleSwipeUndoAdapter simpleSwipeUndoAdapter = new SimpleSwipeUndoAdapter(adapter, this, new MyOnDismissCallback(adapter, this)); AlphaInAnimationAdapter animAdapter = new AlphaInAnimationAdapter(simpleSwipeUndoAdapter); animAdapter.setAbsListView(listView); //assert animAdapter.getViewAnimator() != null; animAdapter.getViewAnimator().setInitialDelayMillis(INITIAL_DELAY_MILLIS); listView.SetAdapter(animAdapter); /* Enable drag and drop functionality */ listView.enableDragAndDrop(); listView.setDraggableManager(new TouchViewDraggableManager(Resource.Id.list_row_draganddrop_touchview)); listView.setOnItemMovedListener(new MyOnItemMovedListener(adapter, this)); listView.OnItemLongClickListener = new MyOnItemLongClickListener(listView); /* Enable swipe to dismiss */ listView.enableSimpleSwipeUndo(); /* Add new items on item click */ listView.OnItemClickListener = new MyOnItemClickListener(listView, this); }
//@Override protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); mExpandableListItemAdapter = new MyExpandableListItemAdapter(this); AlphaInAnimationAdapter alphaInAnimationAdapter = new AlphaInAnimationAdapter(mExpandableListItemAdapter); alphaInAnimationAdapter.setAbsListView(getListView()); //assert alphaInAnimationAdapter.getViewAnimator() != null; alphaInAnimationAdapter.getViewAnimator().setInitialDelayMillis(INITIAL_DELAY_MILLIS); getListView().Adapter = alphaInAnimationAdapter; Toast.MakeText(this, Resource.String.explainexpand, ToastLength.Long).Show(); }