Hi, I am trying to execute this code, which modifies the properties of "PosRelativeToAnchor" at runtime and does not work:
procedure TAndroidModule1.btTestClick(Sender: TObject);
begin
lbTest2.Anchor := btTest;
lbTest2.PosRelativeToParent:=[rpCenterHorizontal];
lbTest2.PosRelativeToAnchor:=[raBelow];
lbTest2.ResetAllRules();
lbTest2.UpdateLayout();
end;
I think I know why, if we modify these lines, it would work correctly, I've tried it and it works (in "androidwidget.pas"):
procedure jVisualControl.UpdateLayout();
begin
if Self.Anchor <> nil then
Self.AnchorId:= Self.Anchor.Id
else
Self.AnchorId:= -1;
end;
Attached example of the test performed, I assume that in other components will have the same problem.