D Deleted member 103 Guest Feb 13, 2011 #1 Hi, something is possible? z.B. : 1.Activity with Orientations Supported=Both 2.Activity with Orientations Supported=Portrait Thank-you, Filippo
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 Feb 15, 2011 #2 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: Code: Copy <activity android:name="activity2" android:label="Activity2" android:screenOrientation="unspecified"> You can change "unspecified" to "portrait" or "landscape".
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: Code: Copy <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 Jul 10, 2015 #4 @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. Click to expand... have another way to put landscape and portrait activitys on same app? SOLVED WITH SetActivityAttribute(video, android:screenOrientation, "landscape") Click to expand... IN MANIFEST Last edited: Jul 10, 2015
@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. Click to expand... have another way to put landscape and portrait activitys on same app? SOLVED WITH SetActivityAttribute(video, android:screenOrientation, "landscape") Click to expand... IN MANIFEST