Exemple #1
0
 @Override
 public View onCreateCandidatesView() {
   ViewGroup vg = (ViewGroup) viewCandidate.getParent();
   if (vg != null) {
     vg.removeView(viewCandidate);
   }
   return viewCandidate;
 }
Exemple #2
0
  /** Load configuration which is managed by {@link VnImeSettings} */
  protected void loadConfiguration() {
    SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);

    connManager.setModifiers(
        sp.getString(getString(R.string.vnime_settings_key_typingmethod), null));
    connManager.setMacroEnabled(
        sp.getBoolean(getString(R.string.vnime_settings_key_macro_enable), true));
    connManager.setRevertEnabled(
        sp.getBoolean(getString(R.string.vnime_settings_key_spellcheck_revert), true));

    showInputView =
        sp.getBoolean(getString(R.string.vnime_settings_key_showsoftkeyboard), showInputView);
    showInputViewAlways =
        sp.getBoolean(
            getString(R.string.vnime_settings_key_showsoftkeyboard_always), showInputViewAlways);
    showCandidateView =
        sp.getBoolean(getString(R.string.vnime_settings_key_showsuggestion), showCandidateView);
    viewCandidate.setMacroEnabled(
        sp.getBoolean(getString(R.string.vnime_settings_key_macro_enable), true));

    viewInput.setAutoCapSentences(
        sp.getBoolean(getString(R.string.vnime_settings_key_autocapsentences), true));
    viewInput.setAlwaysShowNumKeys(
        sp.getBoolean(getString(R.string.vnime_settings_key_alwaysshownumber), false));
    int feedbackType = 0;
    if (sp.getBoolean(getString(R.string.vnime_settings_key_feedback_visual), true)) {
      feedbackType |= InputView.FEEDBACK_TYPE_VISUAL;
    }
    if (sp.getBoolean(getString(R.string.vnime_settings_key_feedback_sound), false)) {
      feedbackType |= InputView.FEEDBACK_TYPE_SOUND;
    }
    if (sp.getBoolean(getString(R.string.vnime_settings_key_feedback_vibration), false)) {
      feedbackType |= InputView.FEEDBACK_TYPE_VIBRATION;
    }
    viewInput.setFeedbackType(feedbackType);
  }