Adobe AIR - 在 Sony S 平板电脑上调暗/隐藏系统菜单栏(从图标到点)

发布于 2024-12-28 22:23:38 字数 655 浏览 4 评论 0原文

索尼 S 平板电脑允许应用程序减少“后退”、“菜单”和“搜索”系统按钮,使它们显示为三个简单的点,从而在应用程序运行时减少用户界面的干扰。我下载了一个名为 tweetHUNT 的 Adob​​e AIR 应用程序来执行此操作。

有谁知道如何用 ActionScript 做到这一点?

谢谢。

更新:不知何故,我需要将 SystemUIVisibility() 设置为 SYSTEM_UI_FLAG_LOW_PROFILE

如何激活全屏控制 DOTS (SDK14)

更新:需要以某种方式从空中扩展进行 setSystemUIVisibility() android 调用。

http://www.adobe.com/ devnet/air/articles/developing-native-extensions-air.edu.html

The Sony S Tablet allows applications to reduce the BACK, MENU, and SEARCH system buttons so that they appear as three simple dots, allowing a less distracting user-interface when the application is running. I downloaded an Adobe AIR app called tweetHUNT that does this.

Does anyone know how to do this with ActionScript?

Thanks.

Update: Somehow I need to setSystemUIVisibility() to SYSTEM_UI_FLAG_LOW_PROFILE

How to activate full screen control DOTS (SDK14)

Update: Need to somehow make the setSystemUIVisibility() android call from an air extension.

http://www.adobe.com/devnet/air/articles/developing-native-extensions-air.edu.html

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爱,才寂寞 2025-01-04 22:23:38

更新:

stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

将使系统栏变暗。

要在应用程序重新激活时重新调暗系统栏:

   private function CMain_HandleActivate(e:Event){

       stage.displayState=StageDisplayState.NORMAL;       
       v_uTimeOutRef = setTimeout(CMain_SetFullScreenTimer, 1000);

   }                
   private function CMain_SetFullScreenTimer(){
       stage.displayState=StageDisplayState.FULL_SCREEN_INTERACTIVE;
       clearTimeout(v_uTimeOutRef);
   }

在应用程序重新激活时设置 FULL_SCREEN_INTERACTIVE 将不起作用。您需要稍微延迟一下通话。

当按下后退按钮时我也会这样做,因为我将后退按钮设置为不执行任何操作。

    public function CMain_KeyDown(e:KeyboardEvent){                 

        if(e.keyCode == Keyboard.BACK)
        {
            e.preventDefault();
            trace("CMain_Event_KeyDown() : BACK");              
            CMain(root).CMain_Dbg_Trace(1,"CMain_Event_KeyDown() : BACK");

            //Re-dim the screen.
            stage.displayState=StageDisplayState.NORMAL;          
            v_uTimeOutRef = setTimeout(CMain_SetFullScreenTimer, 1000);


            if(CMain.v_g_bDebug){
                NativeApplication.nativeApplication.exit();
            }
        }   
    }

[适用于 Android 版 Adob​​e AIR 3.4 以及配备 Android ICS 的 Sony Tablet S]

pixelpaton 致敬

Update:

stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

Will dim the system bar.

To re-dim the system bar when the app is re-activated:

   private function CMain_HandleActivate(e:Event){

       stage.displayState=StageDisplayState.NORMAL;       
       v_uTimeOutRef = setTimeout(CMain_SetFullScreenTimer, 1000);

   }                
   private function CMain_SetFullScreenTimer(){
       stage.displayState=StageDisplayState.FULL_SCREEN_INTERACTIVE;
       clearTimeout(v_uTimeOutRef);
   }

Setting FULL_SCREEN_INTERACTIVE at the exact moment that the app is re-activated will not work. You need to delay the call a little bit.

I am also doing this for when the Back button is pressed, as I have the back button set to not do anything.

    public function CMain_KeyDown(e:KeyboardEvent){                 

        if(e.keyCode == Keyboard.BACK)
        {
            e.preventDefault();
            trace("CMain_Event_KeyDown() : BACK");              
            CMain(root).CMain_Dbg_Trace(1,"CMain_Event_KeyDown() : BACK");

            //Re-dim the screen.
            stage.displayState=StageDisplayState.NORMAL;          
            v_uTimeOutRef = setTimeout(CMain_SetFullScreenTimer, 1000);


            if(CMain.v_g_bDebug){
                NativeApplication.nativeApplication.exit();
            }
        }   
    }

[Works on Adobe AIR 3.4 for Android with Sony Tablet S with Android ICS]

Hat tip to pixelpaton

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文