Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/197.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使应用程序全屏显示在服务中而不是活动中_Java_Android - Fatal编程技术网

Java 使应用程序全屏显示在服务中而不是活动中

Java 使应用程序全屏显示在服务中而不是活动中,java,android,Java,Android,如何使应用程序在服务中全屏显示?(无活动) 标记重复的问题不可用!是的,此问题被标记为重复的问题已被删除,您需要10k代表才能查看该问题@CommonsWare@XaverKapeller当前位置在我将其标记为副本时,它没有被删除,尽管它们在时间上一定很接近。出于兴趣,这有什么目的?创建全屏非活动只会留下一个空白屏幕,不是吗?你要展示什么? this.view = ((LayoutInflater)this.getSystemService("layout_inflater")).inflate

如何使应用程序在服务中全屏显示?(无活动)


标记重复的问题不可用!是的,此问题被标记为重复的问题已被删除,您需要10k代表才能查看该问题@CommonsWare@XaverKapeller当前位置在我将其标记为副本时,它没有被删除,尽管它们在时间上一定很接近。出于兴趣,这有什么目的?创建全屏非活动只会留下一个空白屏幕,不是吗?你要展示什么?
this.view = ((LayoutInflater)this.getSystemService("layout_inflater")).inflate(R.layout.lockscreen, (ViewGroup)null);
this.windowManager = (WindowManager)this.getSystemService("window");
final WindowManager.LayoutParams windowManagerLayoutParams = new WindowManager.LayoutParams();
windowManagerLayoutParams.type = 2002;
windowManagerLayoutParams.format = 1;
windowManagerLayoutParams.height = -1;
windowManagerLayoutParams.width = -1;
windowManager.addView(this.view, (WindowManager.LayoutParams)windowManagerLayoutParams);