0
我有一個customlistadapter
和的onclick聽者一個listactivity
不被當我從列表ListAdapter OnClickListener不會被調用
下面觸碰某個項目堪稱是我的onCreate方法
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.listitem);
List<AvailableFeatures> listIntfeats = VehicleAssetsDB.GetAvailableFeatures(2);
CustomAdapter ca = new CustomAdapter(this, listIntfeats);
ListAdapter = ca;
}
下面是我的onlistitemclick聽衆
protected override void OnListItemClick(ListView l, View v, int position, long id)
{
System.Console.Writeline("test");
}
但是當我從列表中選擇一個項目什麼都不會發生。
感謝
變化'的System.Console.WriteLine( 「測試」);''到Log.d( 「標籤」, 「測試」);'然後查看logcat的 – petey
這沒有解決問題 –
你在哪裏分配你的點擊監聽器? – dymmeh