AddFromResource of TTMSFMXBitmapContainer not working in Linux(FMXLinux) and Android. Any workaround. I am using latest TMS FMX Pack with Tokyo 10.2.2 build 2004. It's adding empty bitmap in Linux and Android.
Hi,
Pieter Scheldeman2018-01-08 14:29:38
I am adding BitmapContainer in TTMSFMXHTMLText. You can add bitmap in res file which I tested not working in Linux and Android.
TEmoticon = record
Description: String;
Name: String;
Key: String;
size: string;
NumberOfFrame: Integer;
end;
var
fEmoticons : TList<TEmoticon>;
procedure TemoModule.DataModuleCreate(Sender: TObject);
var
aTask: iTask;
begin
//BitmapContainer.Items.Clear;
aTask := TTask.Create(
procedure
var
vemo: TEmoticon;
begin
for vemo in fEmoticons do
begin
TParallel.&For(vemo.NumberOfFrame, 1, vemo.NumberOfFrame,
procedure(AIndex: Integer)
begin
BitmapContainer.AddFromResource(Format('%s,%d', [vemo.Name, AIndex]
), Format('%s,%d', [vemo.Name, AIndex]));
end);
end;
end);
aTask.Start;
end;
This is what I found, Linux doesn't like "," in resource name. If you just replace "," with "_" it works. But haven't tested with Android, though I think it will work as Android is Linux.
Hi, thank you for this confirmation and workaround