opt
This commit is contained in:
@@ -30,7 +30,7 @@ class WindowManagerImpl implements IWindowManagerView {
|
||||
mLayoutParams.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
|
||||
}
|
||||
mLayoutParams.format = PixelFormat.TRANSLUCENT;
|
||||
mLayoutParams.gravity = Gravity.CENTER;
|
||||
mLayoutParams.gravity = mParams.mGravity;
|
||||
mLayoutParams.flags = WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
|
||||
|
||||
mLayoutParams.width = mParams.mWidth;
|
||||
@@ -59,6 +59,5 @@ class WindowManagerImpl implements IWindowManagerView {
|
||||
mWindowManager.removeView(mParams.mContentView);
|
||||
isShowing = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,11 @@ public class WindowManagerView {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder gravity( int gravity ) {
|
||||
mParams.mGravity = gravity;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认dialog实现
|
||||
*
|
||||
@@ -105,5 +110,6 @@ public class WindowManagerView {
|
||||
public int mHeight;
|
||||
public int mX;
|
||||
public int mY;
|
||||
public int mGravity;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user