简体   繁体   English

我可以针对不同的应用程序活动针对隐式意图设置横向方向吗?

[英]Can I set landscape orientation on implicit intent for a diferent app activity?

I am trying to open a pdf file with Android default app for pdf's. 我正在尝试使用Android默认应用程序打开pdf的pdf文件。 I made an Implicit intent and works fine, but I need to set landscape orientation just when pdf is open, not after. 我提出了一个隐式意图并可以正常工作,但是我需要仅在打开pdf时设置横向方向,而不是在打开之后。 I have this line: 我有这条线:

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

This line set landscape when app select menu is open. 当应用程序选择菜单打开时,此行设置横向。 But when I select "Pdf reader app" it just set portrait again. 但是,当我选择“ Pdf阅读器应用程序”时,它将再次设置人像。 The question is: Can I modify anything aspect of an external app from my app? 问题是:我可以从我的应用程序修改外部应用程序的任何方面吗? Is this possible? 这可能吗?

I do not think that is possible. 我认为这是不可能的。 as the way an activity or fragment is displayed is under the cotrole of the code. 因为活动或片段的显示方式位于代码的下方。 This is not a feature of the system. 这不是系统的功能。 So it would not be possible to change the display mode of an activity of an application that you have not developed 因此,不可能更改尚未开发的应用程序活动的显示模式

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM