2 Activity-module with different Orientation

D

Deleted member 103

Guest
Hi,

something is possible?
z.B. :
1.Activity with Orientations Supported=Both
2.Activity with Orientations Supported=Portrait

Thank-you,
Filippo
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can do it by modifying AndroidManifest.xml. After modifying it change it to be a read-only file so it will not be overwritten.
The file is located under the Objects folder.

Each activity has a line similar to:
B4X:
<activity android:name="activity2" android:label="Activity2" android:screenOrientation="unspecified">
You can change "unspecified" to "portrait" or "landscape".
 

Douglas Farias

Expert
Licensed User
Longtime User
@Erel
i made a test on b4a 5.02 (1).
i have change on AndroidManifest.xml to landscape and put this read only.
but when compile the b4a generate a new xml file named AndroidManifest-Example.xml
this is portrait, if i change to landscape and save read only again show error on compilation.

B4A version: 5.02 (1)
Parsing code. (0.01s)
Compiling code. Error
O acesso ao caminho 'C:\Users\serig\Desktop\Mega\Mega Play\Objects\AndroidManifest-Example.xml' foi negado.

have another way to put landscape and portrait activitys on same app?


SOLVED WITH
SetActivityAttribute(video, android:screenOrientation, "landscape")
IN MANIFEST
 
Last edited:
Top