Android Question Different button sizes in Msgbox2Async and Android 11

Creideiki

Active Member
Licensed User
Longtime User
Hi,

on devices with Android 11 my Msgboxes create sometimes very small buttons. Both boxes are created with Msgbox2Async, the one with the small buttons directly in Main.Activity_Create, the one with the normal buttons a bit later in a sub which is called from Activity_Create.
There are other boxes in other activities, which sometimes show tiny and sometimes normal buttons.

Does anyone have an idea what happens there?
 

Attachments

  • Screenshot_20211025-085941.jpg
    49.7 KB · Views: 142
  • Screenshot_20211025-090203.jpg
    73.9 KB · Views: 125

Creideiki

Active Member
Licensed User
Longtime User
Oh, well... that crashes my UI quite much, especially the colors...
Is there no way to get the old Theme.Light outfit?

I had a simple
B4X:
SetApplicationAttribute(android:theme, "@android:style/Theme.Light")
 
Upvote 0

Creideiki

Active Member
Licensed User
Longtime User
BTW: I have a transparent Activity to show Boxes from e.g. Services, It uses
B4X:
SetActivityAttribute(TransparentActivity, android:theme, "@android:style/Theme.Translucent")
I assume I have to change something here, too?
Is there a tutorial anywhere out there?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
BTW: I have a transparent Activity to show Boxes from e.g. Services, It uses
It will not work on Android 10+ unless you handle the special "draw over apps" permission.

Using an Android 2 theme on new devices is likely to cause all kinds of problems.
 
Upvote 0

Creideiki

Active Member
Licensed User
Longtime User
Sorry for the delay.

The TransparentActivity works - but it shows the old theme.
How can I use the standard theme for that?
 
Upvote 0

Creideiki

Active Member
Licensed User
Longtime User
Thanks for the answer... I'm using the transparent activity for Services to show information for the user. So a replacement is not that easy... I was happy when I managed to do that with a transparent activity ;-)
Would a B4XDialog work better than a MsgboxAsync?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'm using the transparent activity for Services to show information for the user.
This will not work on Android 10, unless you are requesting the special draw over apps permission.

Would a B4XDialog work better than a MsgboxAsync?
It will allow you to customize it.
 
Upvote 0

Creideiki

Active Member
Licensed User
Longtime User
Well, it seems to work (with Android 11, too). I in fact have to customize a bit, but this way I can do some things which weren't possible before.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…