我有一个关于我的 xamarin android 项目的问题,目前我遇到了我的列表视图的问题,我有 1 行,想在它下面添加一些文本,例如描述
目前
理念
我当前使用的代码是:
ListView listView;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.Main);
Bla WebS = new Bla ();
var ListSort = WebS.Fetch(Core.AdresID, DateTime.Today.Year, null);
var Sorts = ListSort.Where(i => i.Date >= DateTime.Today).Select(k=> k.Sort).ToArray();
var Dates = ListSort.Where(i => i.Date >= DateTime.Today).Select(k => k.Date).ToArray();
listView = FindViewById<ListView>(Resource.Id.ListView1);
listView.Adapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleListItemSingleChoice, Sorts);
listView.ChoiceMode = ChoiceMode.Single;
listView.ItemClick += new EventHandler<AdapterView.ItemClickEventArgs>(listView_ItemClick);
}
void listView_ItemClick(object sender, AdapterView.ItemClickEventArgs e)
{
ListView listView = sender as ListView;
if (listView != null)
{
MessageBox("Chosen item: " + listView.Adapter.GetItem(e.Position));
}
}
有人知道如何达到吗?