本文整理汇总了C#中RecyclerView.FindViewHolderForAdapterPosition方法的典型用法代码示例。如果您正苦于以下问题:C# RecyclerView.FindViewHolderForAdapterPosition方法的具体用法?C# RecyclerView.FindViewHolderForAdapterPosition怎么用?C# RecyclerView.FindViewHolderForAdapterPosition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RecyclerView
的用法示例。
在下文中一共展示了RecyclerView.FindViewHolderForAdapterPosition方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowPopupMenu
private static void ShowPopupMenu(object sender, ListItemEventArgs args, RecyclerView rv, ContactFragment cf)
{
ListItemAdapter adapter = (ListItemAdapter) sender;
adapter.SelectedItem = adapter.Items[args.Position];
PopupMenu menu = new PopupMenu(cf.Activity, rv.FindViewHolderForAdapterPosition(args.Position).ItemView);
menu.Menu.Add(0, 0, 0, "Remove this contact");
menu.SetOnMenuItemClickListener(cf);
menu.SetOnDismissListener(cf);
menu.Show();
}
示例2: ShowPopupMenu
private static void ShowPopupMenu(object sender, ListItemEventArgs args, RecyclerView rv, AddContactsScherm acs)
{
ListItemAdapter adapter = (ListItemAdapter) sender;
adapter.SelectedItem = adapter.Items[args.Position];
PopupMenu menu = new PopupMenu(acs, rv.FindViewHolderForAdapterPosition(args.Position).ItemView);
menu.Menu.Add(0, 0, 0, "Add this user");
menu.SetOnMenuItemClickListener(acs);
menu.SetOnDismissListener(acs);
menu.Show();
}