I. Full Screen Settings
Public void updateFullscreenMode (){
/// Set isFullscrean to false to solve the problem. That's what google explains ~~
Boolean isFullscreen = mShowInputRequested & amp; onEvaluateFullscreenMode (); // YES, it is here !!
Boolean changed = mLastShowInputRequested! = MShowInputRequested;
If (mIsFullscreen! = IsFullscreen |! MFullscreenApplied ){
Changed = true;
MIsFullscreen = isFullscreen;
InputConnection ic = getCurrentInputConnection ();
If (ic! = Null) ic. reportFullscreenMode (isFullscreen );
MFullscreenApplied = true;
Initialize ();
LinearLayout. LayoutParams lp = (LinearLayout. LayoutParams)
MFullscreenArea. getLayoutParams ();
If (isFullscreen ){
MFullscreenArea. setBackgroundDrawable (mThemeAttrs. getDrawable (
Com. android. internal. R. styleable. InputMethodService_imeFullscreenBackground ));
Lp. height = 0;
Lp. weight = 1;
} Else {
MFullscreenArea. setBackgroundDrawable (null );
Lp. height = LinearLayout. LayoutParams. WRAP_CONTENT;
Lp. weight = 0;
}
(ViewGroup) mFullscreenArea. getParent (). updateViewLayout (
MFullscreenArea, lp );
If (isFullscreen ){
If (mExtractView = null ){
View v = onCreateExtractTextView ();
If (v! = Null ){
SetExtractView (v );
}
}
StartExtractingText (false );
}
UpdateExtractFrameVisibility ();
}
If (changed ){
OnConfigureWindow (mWindow. getWindow (), isFullscreen,
! MShowInputRequested );
MLastShowInputRequested = mShowInputRequested;
}
}
Only onConfigureWindow (mWindow. getWindow (), isFullscreen,
! MShowInputRequested); this method can be used to set whether to enable full screen.
Windwon is this. getWindow (). getWindow (); because the interface of the input method is dialog, this. getWindow () produces dialog. IsFullscreen to set whether to enable full screen, false to cancel full screen, and true to full screen. Ii. Hide and exit the Input Method
Inheritance Method
@ Override
Public void requestHideSelf (int flags ){
// TODO Auto-generated method stub
Super. requestHideSelf (flags );
}
This method is called to hide the property. flags is used to process the hidden property.