答案 0 :(得分:0)
我最终使用了系统警报窗口。
以防万一有兴趣做同样的事情 - 这是代码:
WindowManager wm = (WindowManager) context.getSystemService(activity.WINDOW_SERVICE);
WindowManager.LayoutParams params = new WindowManager.LayoutParams(
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.TYPE_PHONE,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
PixelFormat.TRANSLUCENT);
params.gravity=Gravity.TOP;
TextView textView = new TextView(context);
textView.setText("Touch to return to my app");
wm.addView(view, params);
谢谢!