Skip to content

Commit

Permalink
update float window to not touchable and smaller
Browse files Browse the repository at this point in the history
  • Loading branch information
codeskyblue committed Mar 23, 2021
1 parent 59c8402 commit c418ffb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/src/main/java/com/github/uiautomator/FloatView.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public void show() {
| WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON; // 保持屏幕常亮

// Set to not touchable
//params.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;
//params.flags &= (~WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL);
params.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;
params.flags &= (~WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL);

int mType;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
Expand All @@ -100,11 +100,11 @@ public void show() {
params.type = mType;
params.format = PixelFormat.RGBA_8888;
params.gravity = Gravity.LEFT | Gravity.TOP;
params.width = minWidthHeight / 10;
params.height = minWidthHeight / 10;
params.width = minWidthHeight / 20;
params.height = minWidthHeight / 20;
params.x = screenWidth - sideGap() - params.width;
params.y = screenHeight / 3 * 2;
params.alpha = 0.5f;
params.alpha = 0.2f;
this.setParams(params);
windowManager.addView(this, params);
}
Expand Down

0 comments on commit c418ffb

Please sign in to comment.