android.widget.EditText.isSuggestionsEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(177)

本文整理了Java中android.widget.EditText.isSuggestionsEnabled()方法的一些代码示例,展示了EditText.isSuggestionsEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EditText.isSuggestionsEnabled()方法的具体详情如下:
包路径:android.widget.EditText
类名称:EditText
方法名:isSuggestionsEnabled

EditText.isSuggestionsEnabled介绍

暂无

代码示例

代码示例来源:origin: rey5137/material

/**
 * Return whether or not suggestions are enabled on this TextView. The suggestions are generated
 * by the IME or by the spell checker as the user types. This is done by adding
 * {@link android.text.style.SuggestionSpan}s to the text.
 *
 * When suggestions are enabled (default), this list of suggestions will be displayed when the
 * user asks for them on these parts of the text. This value depends on the inputType of this
 * TextView.
 *
 * The class of the input type must be {@link android.text.InputType#TYPE_CLASS_TEXT}.
 *
 * In addition, the type variation must be one of
 * {@link android.text.InputType#TYPE_TEXT_VARIATION_NORMAL},
 * {@link android.text.InputType#TYPE_TEXT_VARIATION_EMAIL_SUBJECT},
 * {@link android.text.InputType#TYPE_TEXT_VARIATION_LONG_MESSAGE},
 * {@link android.text.InputType#TYPE_TEXT_VARIATION_SHORT_MESSAGE} or
 * {@link android.text.InputType#TYPE_TEXT_VARIATION_WEB_EDIT_TEXT}.
 *
 * And finally, the {@link android.text.InputType#TYPE_TEXT_FLAG_NO_SUGGESTIONS} flag must <i>not</i> be set.
 *
 * @return true if the suggestions popup window is enabled, based on the inputType.
 */
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
public boolean isSuggestionsEnabled (){
  return Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH && mInputView.isSuggestionsEnabled();
}

代码示例来源:origin: enricocid/LaunchEnr

@Override
  public boolean isSuggestionsEnabled() {
    return !mForceDisableSuggestions && super.isSuggestionsEnabled();
  }
}

相关文章

微信公众号

最新文章

更多

EditText类方法