0
votes

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

1

1 Answers

0
votes

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