diff --git a/playerview/src/main/java/com/dl7/player/media/IjkPlayerView.java b/playerview/src/main/java/com/dl7/player/media/IjkPlayerView.java index 41134f0..d5f9693 100644 --- a/playerview/src/main/java/com/dl7/player/media/IjkPlayerView.java +++ b/playerview/src/main/java/com/dl7/player/media/IjkPlayerView.java @@ -996,7 +996,7 @@ private void _changeHeight(boolean isFullscreen) { * 设置UI沉浸式显示 */ private void _setUiLayoutFullscreen() { - if (Build.VERSION.SDK_INT >= 19) { + if (Build.VERSION.SDK_INT >= 14) { // 获取关联 Activity 的 DecorView View decorView = mAttachActivity.getWindow().getDecorView(); // 沉浸式使用这些Flag @@ -1026,7 +1026,7 @@ private void _setUiLayoutFullscreen() { public void configurationChanged(Configuration newConfig) { _refreshOrientationEnable(); // 沉浸式只能在SDK19以上实现 - if (Build.VERSION.SDK_INT >= 19) { + if (Build.VERSION.SDK_INT >= 14) { if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) { // 获取关联 Activity 的 DecorView View decorView = mAttachActivity.getWindow().getDecorView(); diff --git a/sample/src/main/java/com/dl7/playerdemo/IjkPlayerActivity.java b/sample/src/main/java/com/dl7/playerdemo/IjkPlayerActivity.java index 184a680..aaff4c2 100644 --- a/sample/src/main/java/com/dl7/playerdemo/IjkPlayerActivity.java +++ b/sample/src/main/java/com/dl7/playerdemo/IjkPlayerActivity.java @@ -25,6 +25,7 @@ public class IjkPlayerActivity extends AppCompatActivity { private View mEtLayout; private EditText mEditText; private Button mIvSend; + private boolean mIsFocus; @Override protected void onCreate(Bundle savedInstanceState) { @@ -62,6 +63,7 @@ public void onFocusChange(View view, boolean isFocus) { if (isFocus) { mPlayerView.editVideo(); } + mIsFocus = isFocus; } }); } @@ -125,7 +127,7 @@ private void _closeSoftInput() { } private boolean _isHideSoftInput(View view, int x, int y) { - if (view == null || !(view instanceof EditText)) { + if (view == null || !(view instanceof EditText) || !mIsFocus) { return false; } return x < mEtLayout.getLeft() ||