jListView with image lazarus / 43-Android ---------------------------------------------------------------------- xinyiman · 2023-04-06 14:05 Someone explain to me how to put in a listview an image (loaded at runtime retrieved from a record in sqlite) aligned left and the text in the center. I need it to be able to preview a series of products combined with their name. A thousand thanks ---------------------------------------------------------------------- jmpessoa · 2023-04-06 14:35 Hi, xinyiman! If you can retrieve the image from a record in sqlite.... then you can try some code like theses [events]: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TAndroidModule1.ListView1DrawItemBitmap(Sender: TObject;  itemIndex: integer; itemCaption: string; out bimap: JObject);begin  if itemIndex = 1 then   //only item index = 1 has a image ...  begin    bimap:= ImageFileManager1.LoadThumbnailFromAssets('lemur_funny.png', 72, 72);  end;end;  or Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TAndroidModule1.ListView1DrawItemWidgetBitmap(Sender: TObject;  itemIndex: integer; widgetText: string; out bimap: JObject);begin  if itemIndex = 1 then   //only item index = 1 has a image ...  begin    bimap:= ImageFileManager1.LoadThumbnailFromAssets('lemur_funny.png', 72, 72);  end;end; ---------------------------------------------------------------------- xinyiman · 2023-04-06 14:49 I was thinking of saving images in base64 in text field. How do I then convert them to bitmaps? ---------------------------------------------------------------------- jmpessoa · 2023-04-06 15:21 You can try "jBitmap component" methods: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i     function GetBase64StringFromImage(_bitmap: jObject; _compressFormat: TBitmapCompressFormat): string;    function GetBase64StringFromImageFile(_fullPathToImageFile: string): string;   function GetImageFromBase64String(_imageBase64String: string): jObject;  // <-- try this!