Mohsen Morshedi
Mohsen Morshedi

Reputation: 183

Open another application with landscape screen in android

i biult an app that a part of it use FlashFox Pro to show the flash files. i use the code below to open FlashFox Pro in my app:

Intent webIntent = G.packageManager
                    .getLaunchIntentForPackage("mobi.browser.flfoxpro");
webIntent.setData(Uri.parse("http://trc.ir/loadapp.php?li=10101&fn="+file_name+"&ex="+extention+"&rt=11"));
webIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
G.context.startActivity(webIntent);

i want the FlashFox Pro to be landscape when i open it from my app. what shoul i do???

Upvotes: 1

Views: 404

Answers (1)

pri
pri

Reputation: 1531

In your AndroidManifest.xml file, add the following line in the relevant activity:

android:screenOrientation="landscape"

Additionally, before starting the activity, you can use this function:

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

Upvotes: 1

Related Questions