mardi 5 mai 2015

Making navigation bar touchable in android windowsmanager

 WindowManager.LayoutParams wmlp;
    wmlp = new WindowManager.LayoutParams();
    wmlp.width = WindowManager.LayoutParams.MATCH_PARENT;
    wmlp.height = WindowManager.LayoutParams.MATCH_PARENT;

    wmlp.alpha = 1.0f;
    wmlp.flags =  WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
            | WindowManager.LayoutParams.TYPE_STATUS_BAR
            |WindowManager.LayoutParams.FLAG_SPLIT_TOUCH;
    wmlp.flags &= ~(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
            | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON
            | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
            );
    wmlp.type = WindowManager.LayoutParams.TYPE_SYSTEM_ERROR;
    wmlp.format = -1;
    wmlp.token = null;
    wmlp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE
            | WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN | WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE;

I am applying those parameters to a layout. I want the background activity should not be touchable. It is working fine. But with this having issue as the navigation bar is also untouchable. I want to make it enabled. What can i do?

Aucun commentaire:

Enregistrer un commentaire