Get link Facebook X Pinterest Email Other Apps - September 07, 2017 Is it possible to set the color of the (phone) statusbar in Android? Tokyo provides a property on the form for the iOS statusbar. I can't seem to find a working solution for Android. Get link Facebook X Pinterest Email Other Apps Comments David NottageSeptember 7, 2017 at 3:11 PMThe corresponding Delphi code from the link provided by Dalija, is:uses Androidapi.Helpers, Androidapi.JNI.GraphicsContentViewText;procedure TForm1.FormCreate(Sender: TObject);var LWindow: JWindow;begin LWindow := TAndroidHelper.Activity.getWindow; LWindow.clearFlags(TJWindowManager_LayoutParams.JavaClass.FLAG_TRANSLUCENT_STATUS); LWindow.addFlags(TJWindowManager_LayoutParams.JavaClass.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); LWindow.setStatusBarColor(TJColor.JavaClass.BLUE);end;Except it doesn' t seem to work on my Nexus 5X (Android 8). When it does, it should work on a device with Android 5 or higher.ReplyDeleteRepliesReplySteve JordiSeptember 8, 2017 at 1:30 AMIt's possible with Tokyo if I'm correct. Sarina Dupont showed that in a quick example:community.embarcadero.com - Previewing FireMonkey Features in RAD Studio 10.2ReplyDeleteRepliesReplyDavid NottageSeptember 8, 2017 at 1:59 AMThat's specifically for iOSReplyDeleteRepliesReplyAdd commentLoad more... Post a Comment
The corresponding Delphi code from the link provided by Dalija, is:
ReplyDeleteuses
Androidapi.Helpers, Androidapi.JNI.GraphicsContentViewText;
procedure TForm1.FormCreate(Sender: TObject);
var
LWindow: JWindow;
begin
LWindow := TAndroidHelper.Activity.getWindow;
LWindow.clearFlags(TJWindowManager_LayoutParams.JavaClass.FLAG_TRANSLUCENT_STATUS);
LWindow.addFlags(TJWindowManager_LayoutParams.JavaClass.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
LWindow.setStatusBarColor(TJColor.JavaClass.BLUE);
end;
Except it doesn' t seem to work on my Nexus 5X (Android 8). When it does, it should work on a device with Android 5 or higher.
It's possible with Tokyo if I'm correct. Sarina Dupont showed that in a quick example:
ReplyDeletecommunity.embarcadero.com - Previewing FireMonkey Features in RAD Studio 10.2
That's specifically for iOS
ReplyDelete