RK3568開發平臺Android 11強制所有應用橫屏展示
Android 11強制所有應用橫屏展示
// Edit by jgduan
int screenOrientation;
if(pkg.getSharedUserId() == null){
screenOrientation = 0;
} else {
screenOrientation = sa.getInt(R.styleable.AndroidManifestActivity_screenOrientation, SCREEN_ORIENTATION_UNSPECIFIED);
}
// End
* Change the desired orientation of this activity. If the activity
* is currently in the foreground or otherwise impacting the screen
* orientation, the screen will immediately be changed (possibly causing
* the activity to be restarted). Otherwise, this will be used the next
* time the activity is visible.
*
* @param requestedOrientation An orientation constant as used in
* {@link ActivityInfo#screenOrientation ActivityInfo.screenOrientation}.
*/
public void setRequestedOrientation(@ActivityInfo.ScreenOrientation int requestedOrientation) {
if (mParent == null) {
try {
// Edit by jgduan
//ActivityTaskManager.getService().setRequestedOrientation(
// mToken, requestedOrientation);
if(mApplication != null && mApplication.getApplicationInfo() != null
&& mApplication.getApplicationInfo().uid > 10000){
ActivityTaskManager.getService().setRequestedOrientation(
mToken, ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
} else {
ActivityTaskManager.getService().setRequestedOrientation(
mToken, requestedOrientation);
}
// End
} catch (RemoteException e) {
// Empty
}
} else {
// Edit by jgduan
// mParent.setRequestedOrientation(requestedOrientation);
if(mApplication != null && mApplication.getApplicationInfo() != null
&& mApplication.getApplicationInfo().uid > 10000){
mParent.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
}else{
mParent.setRequestedOrientation(requestedOrientation);
}
// End
}
}
來自 “ ITPUB部落格 ” ,連結:https://blog.itpub.net/70032144/viewspace-3001984/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 短視訊開發app,Android 強制應用全域性橫屏或豎屏APPAndroid
- 直播系統程式碼,強制點開全屏視訊時橫屏展示
- 關於iPad應用強制橫豎屏問題iPad
- 線上直播系統原始碼,強制應用全域性橫屏或豎屏原始碼
- 直播電商平臺開發,橫豎屏切換的方法
- 公安情報研判綜合應用平臺搭建,大資料視覺化大屏展示系統開發大資料視覺化
- Flutter中如何強制某個頁面橫屏Flutter
- 方法|rk3568開發平臺如何去除android正在啟動彈窗Android
- 平臺碎片化 Android應用開發該如何取捨?Android
- 【iCore3應用開發平臺】釋出 iCore3 應用開發平臺使用說明
- 用低程式碼開發平臺開發應用可靠嗎
- MediaPipe - 跨平臺機器學習應用開發框架API機器學習框架
- [嵌入式linux] rk3568 android11點屏流程LinuxAndroid
- 【iCore3應用開發平臺】釋出 iCore3 應用開發平臺暫存器說明
- 高通Android平臺開發Android
- 【iCore3應用開發平臺】釋出 iCore3 應用開發平臺PID控制程式碼
- Android橫豎屏切換Android
- 【iCore3應用開發平臺】釋出 iCore3 應用開發平臺出廠程式碼rev0.0.2
- 【iCore3應用開發平臺】釋出 iCore3 應用開發平臺出廠程式碼rev0.0.6
- 【iCore3應用開發平臺】釋出 iCore3 應用開發平臺出廠程式碼rev0.0.1
- 【iCore3應用開發平臺】釋出 iCore3 應用開發平臺出廠程式碼rev0.0.4
- 【iCore3應用開發平臺】釋出 iCore3 應用開發平臺出廠程式碼rev0.0.3
- 【iCore3應用開發平臺】釋出 iCore3 應用開發平臺出廠程式碼rev0.0.5
- 在零程式碼開發平臺上如何開發應用程式
- 這一平臺橫空出世,國產快速開發時代全面開啟
- 應用哪個低程式碼開發平臺好用
- 5大移動應用開發平臺推薦
- Flutter嚐鮮:跨平臺移動應用開發Flutter
- 用HTML5+JS開發跨平臺的桌面應用HTMLJS
- Node助力Web應用開發——在新的開發平臺,打造高效能Web應用Web
- 低程式碼應用開發平臺,讓企業開發更高效
- Xamarin ios 教程 Xamarin跨平臺開發 C#蘋果應用開發iOSC#蘋果
- OpenCV在Android平臺上的應用OpenCVAndroid
- 高通平臺android開發總結Android
- 一應俱全!開源跨平臺3D應用開發框架Minko3D框架
- H5 遊戲開發:橫屏適配H5遊戲開發
- FInClip開放平臺:淺談輕應用的發展
- 快速構建企業級應用的開發平臺