我需要在主页屏幕中添加拉动刷新。
一开始,axml 是:
[1]:https://pastebin.com/iZNFiqgt
我添加了 swipeRefreshLayout 所以:
在课堂上,我添加了以下代码:
............
SwipeRefreshLayout refreshLayout
protected override void OnCreate (Bundle savedInstanceState)
{
.........
refreshLayout = FindViewById<SwipeRefreshLayout> .
(Resource.Id.swipeRefreshLayout1);
refreshLayout.Refresh += RefreshLayout_Refresh
}
void RefreshLayout_Refresh(object sender, EventArgs e)
{
//insert action pull to refresh
Console.WriteLine("start pull to refresh"); //after delete it and
insert the action
}
但是当我尝试 pullRefresh 页面时应用程序崩溃。错误是:
当年话下
相关分类