XamarinAndroid组件教程RecylerView适配器使用动画

XamarinAndroid组件教程RecylerView适配器使用动画

为RecylerView使用RecylerViewAnimators组件中提供的适配器动画,需要使用RecyclerView类中的SetAdapter()方法,其语法形式如下:

RecyclerView.SetAdapter(Android.Support.V7.Widget.RecyclerView.Adapter)

其中,animator参数指定一个适配器动画,这个动画就是表1-2中列出的内容。例如,下面代码演示在RecylerView中使用适配器动画:

var adapter = new DataAdapter(this, data.ToList());

var alphaAdapter = new AlphaInAnimationAdapter(adapter);

recyclerView.SetAdapter(alphaAdapter);
原文地址:https://www.cnblogs.com/daxueba-ITdaren/p/9155197.html