Calculator Overlay
This commit is contained in:
parent
7643785919
commit
c29863fa2f
@ -46,6 +46,7 @@ public class CalculatorOverlayService extends Service implements ExternalCalcula
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
|
|
||||||
final WindowManager wm = (WindowManager) getSystemService(WINDOW_SERVICE);
|
final WindowManager wm = (WindowManager) getSystemService(WINDOW_SERVICE);
|
||||||
|
|
||||||
final LayoutInflater layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
final LayoutInflater layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
@ -72,8 +73,8 @@ public class CalculatorOverlayService extends Service implements ExternalCalcula
|
|||||||
|
|
||||||
|
|
||||||
final WindowManager.LayoutParams params = new WindowManager.LayoutParams(
|
final WindowManager.LayoutParams params = new WindowManager.LayoutParams(
|
||||||
300,
|
Math.max(wm.getDefaultDisplay().getWidth() / 2, 300),
|
||||||
450,
|
Math.max(wm.getDefaultDisplay().getHeight() / 2, 450),
|
||||||
WindowManager.LayoutParams.TYPE_SYSTEM_ALERT,
|
WindowManager.LayoutParams.TYPE_SYSTEM_ALERT,
|
||||||
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE|WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL|WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH,
|
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE|WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL|WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH,
|
||||||
PixelFormat.TRANSLUCENT);
|
PixelFormat.TRANSLUCENT);
|
||||||
|
Loading…
Reference in New Issue
Block a user