load my custom style to android

941 Views Asked by At

i write my custom listbox item style. I Create my itemstyle.style.

I want to port this style on Android Platform but don't work.

I Add in Resource and bitmap itemstyle.style with identifier "Resource1"

In my code

var
Item: TListboxItem;
Style: TFMXObject;

begin

 Item := TListboxItem.Create(nil);
 Item.Parent := ListBox1;


 Item.StyleLookup := 'Resource1';

 Item.Text := 'Item 1';
end;

How to do it? Thank's an advanced. Marco.

1

There are 1 best solutions below

3
On

Your style needs to be in a TStyleBook component on the form.

The StyleBook property of the form needs to reference the TStyleBook object.

The StyleLookup property needs to reference whatever is in the StyleName property of the topmost object your style element (which should be a child of the TStyleContainer.

If that doesn't help please show the structure of your style file.