Example usage for android.view.inputmethod EditorInfo IME_FLAG_NO_FULLSCREEN

List of usage examples for android.view.inputmethod EditorInfo IME_FLAG_NO_FULLSCREEN

Introduction

In this page you can find the example usage for android.view.inputmethod EditorInfo IME_FLAG_NO_FULLSCREEN.

Prototype

int IME_FLAG_NO_FULLSCREEN

To view the source code for android.view.inputmethod EditorInfo IME_FLAG_NO_FULLSCREEN.

Click Source Link

Document

Flag of #imeOptions : used to request that the IME never go into fullscreen mode.

Usage

From source file:com.hannesdorfmann.search.SearchActivity.java

private void setupSearchView() {
      SearchManager searchManager = (SearchManager) getSystemService(SEARCH_SERVICE);
      searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
      // hint, inputType & ime options seem to be ignored from XML! Set in code
      searchView.setQueryHint(getString(R.string.search_hint));
      searchView.setInputType(InputType.TYPE_TEXT_FLAG_CAP_WORDS);
      searchView.setImeOptions(searchView.getImeOptions() | EditorInfo.IME_ACTION_SEARCH
              | EditorInfo.IME_FLAG_NO_EXTRACT_UI | EditorInfo.IME_FLAG_NO_FULLSCREEN);
  }/*from ww w .  jav  a 2 s .  c  o  m*/

From source file:org.akop.ararat.view.CrosswordView.java

@Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
    Log.v(LOG_TAG, "onCreateInputConnection()");

    CrosswordInputConnection inputConnection = null;
    if (mInputMode != INPUT_MODE_NONE) {
        outAttrs.actionLabel = null;//ww w  . ja  v  a  2  s . c o  m
        outAttrs.inputType = InputType.TYPE_NULL;
        outAttrs.imeOptions |= EditorInfo.IME_FLAG_NO_FULLSCREEN;
        outAttrs.imeOptions |= EditorInfo.IME_FLAG_NO_EXTRACT_UI;
        outAttrs.imeOptions &= ~EditorInfo.IME_MASK_ACTION;
        outAttrs.imeOptions |= EditorInfo.IME_ACTION_NEXT;
        outAttrs.packageName = getContext().getPackageName();

        inputConnection = new CrosswordInputConnection(this);
        inputConnection.setOnInputEventListener(mInputEventListener);
    }

    return inputConnection;
}

From source file:babbq.com.searchplace.SearchActivity.java

private void setupSearchView() {
    SearchManager searchManager = (SearchManager) getSystemService(SEARCH_SERVICE);
    searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
    // hint, inputType & ime options seem to be ignored from XML! Set in code
    searchView.setQueryHint(getString(R.string.search_hint));
    searchView.setInputType(InputType.TYPE_TEXT_FLAG_CAP_WORDS);
    searchView.setImeOptions(searchView.getImeOptions() | EditorInfo.IME_ACTION_SEARCH
            | EditorInfo.IME_FLAG_NO_EXTRACT_UI | EditorInfo.IME_FLAG_NO_FULLSCREEN);
    searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {

        @Override//from ww w .ja  v a 2s .  co  m
        public boolean onQueryTextSubmit(String query) {
            searchFor(query);
            return true;
        }

        @Override
        public boolean onQueryTextChange(String query) {
            if (TextUtils.isEmpty(query)) {
                clearResults();
            }
            return true;
        }
    });
    searchView.setOnQueryTextFocusChangeListener(new View.OnFocusChangeListener() {

        @Override
        public void onFocusChange(View v, boolean hasFocus) {
            if (hasFocus && confirmSaveContainer.getVisibility() == View.VISIBLE) {
                hideSaveConfimation();
            }
        }
    });
}

From source file:org.chromium.chrome.browser.preferences.website.WebsitePreferences.java

@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    inflater.inflate(R.menu.website_preferences_menu, menu);

    MenuItem searchItem = menu.findItem(R.id.search);
    mSearchView = (SearchView) MenuItemCompat.getActionView(searchItem);
    mSearchView.setImeOptions(EditorInfo.IME_FLAG_NO_FULLSCREEN);

    SearchView.OnQueryTextListener queryTextListener = new SearchView.OnQueryTextListener() {
        @Override/* w  ww.ja v a  2s  . c o m*/
        public boolean onQueryTextSubmit(String query) {
            return true;
        }

        @Override
        public boolean onQueryTextChange(String query) {
            if (query.equals(mSearch))
                return true;

            mSearch = query;
            getInfoForOrigins();
            return true;
        }
    };
    mSearchView.setOnQueryTextListener(queryTextListener);
}

From source file:com.yek.keyboard.anysoftkeyboard.AnySoftKeyboard.java

@Override
public boolean onEvaluateFullscreenMode() {
    if (getCurrentInputEditorInfo() != null) {
        final EditorInfo editorInfo = getCurrentInputEditorInfo();
        if ((editorInfo.imeOptions & EditorInfo.IME_FLAG_NO_FULLSCREEN) != 0) {
            //if the view DOES NOT want fullscreen, then do what it wants
            Logger.d(TAG, "Will not go to Fullscreen because input view requested IME_FLAG_NO_FULLSCREEN");
            return false;
        } else if ((editorInfo.imeOptions & EditorInfo.IME_FLAG_NO_EXTRACT_UI) != 0) {
            Logger.d(TAG, "Will not go to Fullscreen because input view requested IME_FLAG_NO_EXTRACT_UI");
            return false;

        }//w w w.  j a  v  a 2s. c o m
    }

    switch (mOrientation) {
    case Configuration.ORIENTATION_LANDSCAPE:
        return mAskPrefs.getUseFullScreenInputInLandscape();
    default:
        return mAskPrefs.getUseFullScreenInputInPortrait();
    }
}

From source file:com.anysoftkeyboard.AnySoftKeyboard.java

@Override
public boolean onEvaluateFullscreenMode() {
    if (getCurrentInputEditorInfo() != null) {
        final EditorInfo editorInfo = getCurrentInputEditorInfo();
        if ((editorInfo.imeOptions & EditorInfo.IME_FLAG_NO_FULLSCREEN) != 0) {
            //if the view DOES NOT want fullscreen, then do what it wants
            Logger.d(TAG, "Will not go to Fullscreen because input view requested IME_FLAG_NO_FULLSCREEN");
            return false;
        } else if ((editorInfo.imeOptions & EditorInfo.IME_FLAG_NO_EXTRACT_UI) != 0) {
            Logger.d(TAG, "Will not go to Fullscreen because input view requested IME_FLAG_NO_EXTRACT_UI");
            return false;

        }/*w ww. j a v a  2  s .c  o m*/
    }

    switch (getResources().getConfiguration().orientation) {
    case Configuration.ORIENTATION_LANDSCAPE:
        return mAskPrefs.getUseFullScreenInputInLandscape();
    default:
        return mAskPrefs.getUseFullScreenInputInPortrait();
    }
}

From source file:com.iiordanov.bVNC.RemoteCanvas.java

@Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
    android.util.Log.d(TAG, "onCreateInputConnection called");
    int version = android.os.Build.VERSION.SDK_INT;
    BaseInputConnection bic = null;/*from   w w w. ja va2  s.co  m*/
    if (!bb && version >= Build.VERSION_CODES.JELLY_BEAN) {
        bic = new BaseInputConnection(this, false) {
            final static String junk_unit = "%%%%%%%%%%";
            final static int multiple = 1000;
            Editable e;

            @Override
            public Editable getEditable() {
                if (e == null) {
                    int numTotalChars = junk_unit.length() * multiple;
                    String junk = new String();
                    for (int i = 0; i < multiple; i++) {
                        junk += junk_unit;
                    }
                    e = Editable.Factory.getInstance().newEditable(junk);
                    Selection.setSelection(e, numTotalChars);
                    if (RemoteCanvas.this.keyboard != null) {
                        RemoteCanvas.this.keyboard.skippedJunkChars = false;
                    }
                }
                return e;
            }
        };
    } else {
        bic = new BaseInputConnection(this, false);
    }

    outAttrs.actionLabel = null;
    outAttrs.inputType = InputType.TYPE_NULL;
    // Workaround for IME's that don't support InputType.TYPE_NULL.
    if (version >= 21) {
        outAttrs.inputType = InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS;
        outAttrs.imeOptions |= EditorInfo.IME_FLAG_NO_FULLSCREEN;
    }
    return bic;
}

From source file:io.github.vomitcuddle.SearchViewAllowEmpty.SearchView.java

/**
 * {@inheritDoc}/*from w  w w .j  a  v a  2  s.c o m*/
 */
@Override
public void onActionViewExpanded() {
    if (mExpandedInActionView)
        return;

    mExpandedInActionView = true;
    mCollapsedImeOptions = mQueryTextView.getImeOptions();
    mQueryTextView.setImeOptions(mCollapsedImeOptions | EditorInfo.IME_FLAG_NO_FULLSCREEN);
    setIconified(false);
}

From source file:android.support.v7.widget.SearchView.java

/**
 * {@inheritDoc}/*from  www .  ja  va 2  s .  c  om*/
 */
@Override
public void onActionViewExpanded() {
    if (mExpandedInActionView)
        return;

    mExpandedInActionView = true;
    mCollapsedImeOptions = mSearchSrcTextView.getImeOptions();
    mSearchSrcTextView.setImeOptions(mCollapsedImeOptions | EditorInfo.IME_FLAG_NO_FULLSCREEN);
    mSearchSrcTextView.setText("");
    setIconified(false);
}