tags:

views:

408

answers:

1

hi

I am doing an android applicaiton and I know its possible to show or hide the notification bar.

but is there a way to show it but Disable the ability to drag it down?

Thanks

+2  A: 

Well I think thats not possible, but you achieve something similar makin your activity FullScreen.

public class FullScreen extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
                                WindowManager.LayoutParams.FLAG_FULLSCREEN);

        setContentView(R.layout.main);
    }
}

Jorgesys

Jorgesys
this code is for hiding the status bar. I am looking for a way to show it and not let the user drag it down.
Daniel Benedykt
well in that case, mbaird has the reason.
Jorgesys
Thanks for the help
Daniel Benedykt
Just want to clarify that as far as I know its not possible, and this is the best solution
Daniel Benedykt