Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Rukey7 committed Nov 29, 2016
1 parent 2391488 commit 51ab38d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -62,6 +63,7 @@ public void onFocusChange(View view, boolean isFocus) {
if (isFocus) {
mPlayerView.editVideo();
}
mIsFocus = isFocus;
}
});
}
Expand Down Expand Up @@ -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() ||
Expand Down

0 comments on commit 51ab38d

Please sign in to comment.