| 请先登录 | 注册 |
| IPSC1978.GICP.NET |
| ■标题:如何实现自动横竖屏,或锁定横屏 |
| ■作者:IPSC [2026/8/20 3:04:07] main里加入,库要引用phone[vb] 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: unspecified #CanInstallToExternalStorage: False #LibraryAuthor: NJDude [/vb] 主页面里加入这个SUB,用的是B4XPAGE [vb] Sub IsLandscape As Boolean Return Root.Width > Root.Height End Sub ...以下是在程序里 If IsLandscape Then Log("当前是横屏") ' 执行横屏布局逻辑 Else Log("当前是竖屏") ' 执行竖屏布局逻辑 End If [/vb] 【回复/版区/上篇/下篇/发贴/仅文字/HTML】 |
| 【倒序/最近21条回复】(暂无) |
| (查看完整版网页) |
| 短讯|首页|登录|算法|电脑版 . DK MiniBBS Plus v2.0 mm0759.com 60 毫秒 . |