Android input method (including handwriting) Supplement

Source: Internet
Author: User

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.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.