机器人 - 禁用拖累通知栏的能力 [英] android - Disable the ability to drag down the notification bar

查看:86
本文介绍了机器人 - 禁用拖累通知栏的能力的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做一个Android应用程序了,我知道它可以显示或隐藏通知栏。

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?

感谢

推荐答案

嗯,我认为那不可能的,但你实现类似的东西做个您的活动全屏。

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

这篇关于机器人 - 禁用拖累通知栏的能力的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆