Android Delphi XE6 mobile:如何在绑定ToObject属性时将ToObject分配给TListviewItem
我有以下资料:Android Delphi XE6 mobile:如何在绑定ToObject属性时将ToObject分配给TListviewItem,android,delphi,delphi-xe6,livebindings,tlistview,Android,Delphi,Delphi Xe6,Livebindings,Tlistview,我有以下资料: TMyObject = class(TObject) ... public property Id: Integer read FId write FId; property Content: string read FContent write FContent; end; TMyList = class(TObjectList<TMyObject>) TMyObject=class(TObject) ... 公众的 属性Id:整数读取FId
TMyObject = class(TObject)
...
public
property Id: Integer read FId write FId;
property Content: string read FContent write FContent;
end;
TMyList = class(TObjectList<TMyObject>)
TMyObject=class(TObject)
...
公众的
属性Id:整数读取FId写入FId;
属性内容:字符串读FCContent写FCContent;
结束;
TMyList=class(TObjectList)
我将TMyList与TAdapterBindSource和TDataGeneratorAdapter一起使用,将TMyList绑定到TListview。好的,项目显示正确
当我在OnItemClick中单击TListview的项目时,我需要知道TListViewItem分配了哪个TMyObject实例
使用TListViewItem.Index无效,因为我的listview有标题项,然后索引值不对应
我需要在单击listview项时获取TMyObject的属性值
谢谢