Android Question Disable Status Bar Expansion

zm989

New Member
Hello, I'm new to B4A and I would like to know if anyone knows a way to disable the expansion of the status bar while maintaining it on top.
Thank you. :)
 

DonManfred

Expert
Licensed User
Longtime User
What exactly are you trying to archieve?

Can you describe it more clearly what your goal is?
 
Upvote 0

zm989

New Member
I want to prevent users from sliding the status bar (expand) but I still want them to be able to see the icons in it.
 
Upvote 0

zm989

New Member
I have tried it and it gives me this error:

Error occurred on line: 37 (Starter)
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:131)
at b4a.example.starter._addoverlay(starter.java:170)
at b4a.example.starter._service_start(starter.java:246)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at b4a.example.starter.handleStart(starter.java:100)
at b4a.example.starter.access$000(starter.java:8)
at b4a.example.starter$1.run(starter.java:71)
at anywheresoftware.b4a.objects.ServiceHelper$StarterHelper.onStartCommand(ServiceHelper.java:237)
at b4a.example.starter.onStartCommand(starter.java:69)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3724)
at android.app.ActivityThread.access$1600(ActivityThread.java:204)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1689)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6865)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:504)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@44ae1c9 -- permission denied for window type 2010
at android.view.ViewRootImpl.setView(ViewRootImpl.java:835)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:355)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93)
... 25 more
 
Upvote 0
Top