Android Question Problem: Only fullscreen opaque activities can request orientation

vecino

Well-Known Member
Licensed User
Longtime User
Hi, if I compile with SDK 26 it works fine, but with 28 it doesn't work anymore. I have changed opaque and transparent colors, I have changed fullscreen yes and no.
What is the solution to this problem?
Thank you.


 

vecino

Well-Known Member
Licensed User
Longtime User
Hello, there is nothing special about the activity, only "Title=False".
I have tried an opaque color, a transparent color, a semi-transparent color.
But it only works if SDK=26 in the manifest.
Thank you.

 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
But, however, when the #SupportedOrientations: unspecified it works well.
But does not work when #SupportedOrientations: portrait
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
I cannot reproduce it in another project, it only happens with this project.
I don't know if I should create a new project and copy all the code and layouts, to see if there is a hidden problem.
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
Hello, I have found the cause of the problem.
Now I would like to find the solution.
I have a couple of activities that occupy only a central part of the screen, so the rest is transparent to be seen behind the main screen.
What alternative can I use?
Thank you.

B4X:
SetActivityAttribute(acDatosSMB,        android:theme, @android:style/Theme.Translucent.NoTitleBar)
SetActivityAttribute(acPreferencias,    android:theme, @android:style/Theme.Translucent.NoTitleBar)
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
With a B4XDialog?
I suppose it is possible to load a layout in it, is that it?
Thank you.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…