public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.Inflate(Resource.Layout.fragment_list_view_example, container, false); this.listView = (RadListView) rootView.FindViewById(Resource.Id.listView).JavaCast<RadListView>(); this.source = new ArrayList (); LoadOnDemandBehavior ldb = new LoadOnDemandBehavior(); ldb.Mode = Com.Telerik.Widget.List.LoadOnDemandBehavior.LoadOnDemandMode.Automatic; ldb.AddListener(this); for (int i = 0; i < 50; i++) { source.Add("Item " + i); } listView.AddBehavior(ldb); this.listView.SetAdapter(new MyListViewAdapter(source)); return rootView; }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.Inflate(Resource.Layout.fragment_list_view_example, container, false); this.listView = (RadListView)rootView.FindViewById(Resource.Id.listView).JavaCast <RadListView>(); this.source = new ArrayList(); LoadOnDemandBehavior ldb = new LoadOnDemandBehavior(); ldb.Mode = Com.Telerik.Widget.List.LoadOnDemandBehavior.LoadOnDemandMode.Manual; ldb.AddListener(this); for (int i = 0; i < 50; i++) { source.Add("Item " + i); } listView.AddBehavior(ldb); this.listView.SetAdapter(new MyListViewAdapter(source)); return(rootView); }