我想在object.i上点击特定行时检索特定项目(即标题和子标题项目)。
var selectedTableItem = e.Parent.GetItemAtPosition(e.Position);
下面是code.Here我得到整个对象,但如何获取对象中的项目?。非常感谢
mTable
答案 0 :(得分:0)
试试这个
void OnListItemClick(object sender, AdapterView.ItemClickEventArgs e)
{
var listView = sender as ListView;
var t = tableItems[e.Position];
Android.Widget.Toast.MakeText(this, t.Heading, Android.Widget.ToastLength.Short).Show();
}
//Make a toast with the item name just to show it was clicked