-
Notifications
You must be signed in to change notification settings - Fork 105
FMXUI Translucent System Bar
KngStr edited this page Jul 2, 2019
·
2 revisions
Add fllowing code to OnCreate event of main form.
procedure TForm1.FormCreate(Sender: TObject);
begin
TFrameView.SetDefaultStatusColor($ff800080);
TFrameView.SetDefaultBackColor($fff1f2f3);
end;- If only
SetDefaultStatusColoris called, the default back color will be0xfff1f2f3. - Use
LocalToAbsoluteto calculate absolute postion. Sometimes you should plus- TView.GetStatusHeight.
- Require API > 21 (Android 5.0).
- Add
res\android\styles_translucent.xmlto Deployment, and setRemote Pathtores\values-v19\.
Actually in iOS status color is Fill of current form. But you still have to call these code.
If something is wrong, check the fill property of form. Make sure kind of it is solid.