Skip to content

Commit 649fcaa

Browse files
committed
删除 BasePopupWindow 类中对于 Android 6.0 以下版本的兼容代码
1 parent 66640a2 commit 649fcaa

1 file changed

Lines changed: 0 additions & 28 deletions

File tree

library/base/src/main/java/com/hjq/base/BasePopupWindow.java

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import androidx.annotation.Nullable;
3131
import androidx.annotation.StringRes;
3232
import androidx.annotation.StyleRes;
33-
import androidx.core.widget.PopupWindowCompat;
3433
import androidx.lifecycle.Lifecycle;
3534
import androidx.lifecycle.LifecycleOwner;
3635
import androidx.lifecycle.LifecycleRegistry;
@@ -236,33 +235,6 @@ public <V extends View> V findViewById(@IdRes int id) {
236235
return getContentView().findViewById(id);
237236
}
238237

239-
@Override
240-
public void setWindowLayoutType(int type) {
241-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
242-
super.setWindowLayoutType(type);
243-
} else {
244-
PopupWindowCompat.setWindowLayoutType(this, type);
245-
}
246-
}
247-
248-
@Override
249-
public int getWindowLayoutType() {
250-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
251-
return super.getWindowLayoutType();
252-
} else {
253-
return PopupWindowCompat.getWindowLayoutType(this);
254-
}
255-
}
256-
257-
@Override
258-
public void setOverlapAnchor(boolean overlapAnchor) {
259-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
260-
super.setOverlapAnchor(overlapAnchor);
261-
} else {
262-
PopupWindowCompat.setOverlapAnchor(this, overlapAnchor);
263-
}
264-
}
265-
266238
/**
267239
* 设置背景遮盖层的透明度
268240
*/

0 commit comments

Comments
 (0)