List of usage examples for android.content.res Configuration HARDKEYBOARDHIDDEN_YES
int HARDKEYBOARDHIDDEN_YES
To view the source code for android.content.res Configuration HARDKEYBOARDHIDDEN_YES.
Click Source Link
From source file:com.renard.documentview.DocumentPagerFragment.java
@Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); boolean isKeyboardHidden = Configuration.KEYBOARDHIDDEN_YES == newConfig.hardKeyboardHidden || Configuration.HARDKEYBOARDHIDDEN_YES == newConfig.hardKeyboardHidden; boolean isKeyboardShown = Configuration.KEYBOARDHIDDEN_NO == newConfig.hardKeyboardHidden || Configuration.HARDKEYBOARDHIDDEN_NO == newConfig.hardKeyboardHidden; // DocumentPagerFragment pagerFragment = (DocumentPagerFragment) // getSupportFragmentManager().findFragmentById(R.id.document_fragment_container); // if (pagerFragment!=null){ if (isKeyboardShown) { showTitleIndicator(false);/*w ww .java 2 s .c o m*/ } else if (isKeyboardHidden) { showTitleIndicator(true); } // } }
From source file:org.alfresco.mobile.android.application.extension.samsung.pen.SNotePagesDialogFragment.java
@Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); // Avoid background stretching if (newConfig.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES) { getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE); }/*from www . j ava2 s . c o m*/ }
From source file:com.ada.utils.Ui.java
public static void showSoftkeyboard(View view, ResultReceiver resultReceiver) { Configuration config = view.getContext().getResources().getConfiguration(); if (config.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES) { InputMethodManager imm = (InputMethodManager) view.getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); if (resultReceiver != null) { imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT, resultReceiver); } else {/* w ww. j a va2 s . com*/ imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); } } }
From source file:com.activiti.android.ui.fragments.form.picker.IdmPickerFragment.java
@Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); if (newConfig.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES) { getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE); } else {//www. j ava2s. c o m getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); } }
From source file:gov.nasa.arc.geocam.geocam.CameraActivity.java
@Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); Log.d(GeoCamMobile.DEBUG_ID, "Keyboard hidden: " + String.valueOf(newConfig.keyboardHidden)); if (newConfig.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO) { showDialog(DIALOG_HIDE_KEYBOARD); } else if (newConfig.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES) { dismissDialog(DIALOG_HIDE_KEYBOARD); }// w ww .j a v a2 s . c o m }
From source file:org.woltage.irssiconnectbot.ConsoleActivity.java
@Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); Log.d(TAG, String.format("onConfigurationChanged; requestedOrientation=%d, newConfig.orientation=%d", getRequestedOrientation(), newConfig.orientation)); if (bound != null) { if (forcedOrientation && (newConfig.orientation != Configuration.ORIENTATION_LANDSCAPE && getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) || (newConfig.orientation != Configuration.ORIENTATION_PORTRAIT && getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)) bound.setResizeAllowed(false); else//from w w w .ja va 2 s. co m bound.setResizeAllowed(true); bound.hardKeyboardHidden = (newConfig.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES); mKeyboardButton.setVisibility(bound.hardKeyboardHidden ? View.VISIBLE : View.GONE); mInputButton.setVisibility(bound.hardKeyboardHidden ? View.VISIBLE : View.GONE); } }
From source file:org.connectbot.ConsoleActivity.java
@Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); Log.d(TAG, String.format("onConfigurationChanged; requestedOrientation=%d, newConfig.orientation=%d", getRequestedOrientation(), newConfig.orientation)); if (bound != null) { if (forcedOrientation && (newConfig.orientation != Configuration.ORIENTATION_LANDSCAPE && getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) || (newConfig.orientation != Configuration.ORIENTATION_PORTRAIT && getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)) bound.setResizeAllowed(false); else/*from w ww . ja v a 2 s.co m*/ bound.setResizeAllowed(true); bound.hardKeyboardHidden = (newConfig.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES); mKeyboardButton.setVisibility(bound.hardKeyboardHidden ? View.VISIBLE : View.GONE); } }
From source file:es.javocsoft.android.lib.toolbox.ToolBox.java
/** * Return TRUE if there is a hardware keyboard and is being made hidden. * /*from w w w .java2 s .c o m*/ * @param context * @return */ public static boolean device_isHardwareKeyboardHidden(Context context) { //You can also get some of the features which are not testable by the PackageManager via the Configuration, e.g. the DPAD. Configuration c = context.getResources().getConfiguration(); if (c.hardKeyboardHidden != Configuration.HARDKEYBOARDHIDDEN_UNDEFINED && c.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES) { return true; } else { return false; } }