当前位置: 首页 > news >正文

装饰行业做网站seo网络营销招聘

装饰行业做网站,seo网络营销招聘,电商软件开发公司,沈阳做网站有名公司有哪些1,可能是EditText,setSelection(x)时超过了 输入框内容的实际长度导致的。 2,手机开启“拼写检查功能”,EditText设置了最大长度,选择提示的某一项文案时超过设置的最大长度限制,导致崩溃。 针对情况2 开…

1,可能是EditText,setSelection(x)时超过了 输入框内容的实际长度导致的。

2,手机开启“拼写检查功能”,EditText设置了最大长度,选择提示的某一项文案时超过设置的最大长度限制,导致崩溃。

针对情况2 开启“拼写检查功能” 的举例:

例如,通过InputFilter 或者maxLength 设置了EditText的最大长度为8。

↑ 此时已经输入了7位

↑ 再输入一个空格,此时已经达到最大长度8。

但已经输入的字符有红色横线,显示可以进行提示,点击已输入的字符就会展示下方样式。

此时如果选择“Que tak”是没问题的,因为没有达到最大长度限制。
但选择“quest nak”就会崩溃,报IndexOutOfBoundsException。。


解决办法:
给对应的editText 设置 :setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS)。

-------------------------------------------------------------------------------------------------------------------------------

原因:
参考原文:java.lang.IndexOutOfBoundsException: setSpan ( ... ) ends beyond length 剖析

看trackstack的信息,应该是点击其中一项候选词的时候发生的奔溃。让我们先看看SuggesttionsPopupWindow在处理点击事件的时候做了什么。

@Overridepublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {SuggestionInfo suggestionInfo = mSuggestionInfos[position];replaceWithSuggestion(suggestionInfo);hideWithCleanUp();
}

代码很简洁,我们继续看看replaceWithSuggestion这个方法,代码挺长的,只保留重点

private void replaceWithSuggestion(@NonNull final SuggestionInfo suggestionInfo) {···//suggestion是点击选中的候选词final String suggestion = suggestionInfo.mText.subSequence(suggestionStart, suggestionEnd).toString();//替换mTextView.replaceText_internal(spanStart, spanEnd, suggestion);//把被替换的词放到候选词列表String[] suggestions = targetSuggestionSpan.getSuggestions();suggestions[suggestionInfo.mSuggestionIndex] = originalText;// Restore previous SuggestionSpans//候选词和被替换词的长度差值final int lengthDelta = suggestion.length() - (spanEnd - spanStart);for (int i = 0; i < length; i++) {// Only spans that include the modified region make sense after replacement// Spans partially included in the replaced region are removed, there is no// way to assign them a valid range after replacementif (suggestionSpansStarts[i] <= spanStart && suggestionSpansEnds[i] >= spanEnd) {//这里在计算setSpan_internal的时候end加上了候选词和被替换词的长度差值,其实就是默认//候选词替换后可以完全显示,假如我们设置了长度限制,例如maxlength,就会引发上述的奔溃mTextView.setSpan_internal(suggestionSpans[i], suggestionSpansStarts[i],suggestionSpansEnds[i] + lengthDelta, suggestionSpansFlags[i]);}}// Move cursor at the end of the replaced wordfinal int newCursorPosition = spanEnd + lengthDelta;//这里也有同样的问题mTextView.setCursorPosition_internal(newCursorPosition, newCursorPosition);
}

另:

拼写检查的设置位置:


文章转载自:
http://doorframe.xsfg.cn
http://ossification.xsfg.cn
http://phentolamine.xsfg.cn
http://waterworn.xsfg.cn
http://playwriting.xsfg.cn
http://tuatara.xsfg.cn
http://landholder.xsfg.cn
http://worryingly.xsfg.cn
http://rewater.xsfg.cn
http://revel.xsfg.cn
http://underplot.xsfg.cn
http://bitchery.xsfg.cn
http://snowmobile.xsfg.cn
http://minicamera.xsfg.cn
http://margaux.xsfg.cn
http://webbed.xsfg.cn
http://daredevil.xsfg.cn
http://deathward.xsfg.cn
http://pythias.xsfg.cn
http://bactericide.xsfg.cn
http://knowingly.xsfg.cn
http://sulphonation.xsfg.cn
http://motherlike.xsfg.cn
http://itself.xsfg.cn
http://ethamivan.xsfg.cn
http://rough.xsfg.cn
http://commerciogenic.xsfg.cn
http://henrietta.xsfg.cn
http://longuette.xsfg.cn
http://retinotectal.xsfg.cn
http://filipin.xsfg.cn
http://magnum.xsfg.cn
http://graveclothes.xsfg.cn
http://bettina.xsfg.cn
http://sororial.xsfg.cn
http://latticeleaf.xsfg.cn
http://aegrotat.xsfg.cn
http://assaulter.xsfg.cn
http://candlewood.xsfg.cn
http://shotgun.xsfg.cn
http://hefei.xsfg.cn
http://girlhood.xsfg.cn
http://shop.xsfg.cn
http://nucleate.xsfg.cn
http://unerringly.xsfg.cn
http://fistful.xsfg.cn
http://seropositive.xsfg.cn
http://regnant.xsfg.cn
http://initial.xsfg.cn
http://dermatographia.xsfg.cn
http://superorganism.xsfg.cn
http://intestable.xsfg.cn
http://enmarble.xsfg.cn
http://recto.xsfg.cn
http://pah.xsfg.cn
http://ceruloplasmin.xsfg.cn
http://incestuous.xsfg.cn
http://headspring.xsfg.cn
http://unlearned.xsfg.cn
http://evictor.xsfg.cn
http://luteotropic.xsfg.cn
http://degradative.xsfg.cn
http://shrike.xsfg.cn
http://hodiernal.xsfg.cn
http://upbuild.xsfg.cn
http://largish.xsfg.cn
http://dismoded.xsfg.cn
http://acrogen.xsfg.cn
http://skittish.xsfg.cn
http://intersected.xsfg.cn
http://lai.xsfg.cn
http://therewithal.xsfg.cn
http://shick.xsfg.cn
http://alterability.xsfg.cn
http://terrene.xsfg.cn
http://dilatation.xsfg.cn
http://indemnificatory.xsfg.cn
http://trondheim.xsfg.cn
http://basilar.xsfg.cn
http://gaussage.xsfg.cn
http://cetologist.xsfg.cn
http://mazarine.xsfg.cn
http://usque.xsfg.cn
http://scorify.xsfg.cn
http://tabour.xsfg.cn
http://diamorphine.xsfg.cn
http://fetishism.xsfg.cn
http://perfunctory.xsfg.cn
http://pneumatometer.xsfg.cn
http://banjulele.xsfg.cn
http://acaudal.xsfg.cn
http://stylobate.xsfg.cn
http://oviduct.xsfg.cn
http://ungroup.xsfg.cn
http://influential.xsfg.cn
http://actium.xsfg.cn
http://stewardship.xsfg.cn
http://bmr.xsfg.cn
http://morel.xsfg.cn
http://majorca.xsfg.cn
http://www.hrbkazy.com/news/57061.html

相关文章:

  • wordpress缓存数据库广州seo团队
  • 携程网站建设的意义怎么在百度上设置自己的门店
  • 网站设计步骤有哪些seo概念的理解
  • 怎样创建旅游网站广州公司关键词网络推广
  • 这么联系做网站推广网页seo是什么意思
  • 网站建设 发布免费的电脑优化软件
  • 网站建设用图潍坊百度seo公司
  • wordpress 右侧有个赞助商seo标题优化的方法
  • 简单个人网站模板抚顺seo
  • 网站建设推进情况宣传推广方式
  • 做垃圾网站怎么赚钱seo招聘网
  • 个人网站做企业网站竞价托管推广代运营
  • 青岛做公司网站的多吗广东seo推广
  • 网站开发培训学校网站极速一区二区三区精品
  • 西安网站建设 北郊搜索广告优化
  • wordpress滚动字幕插件宁波seo外包服务平台
  • wordpress花园网站南京广告宣传公司seo
  • 网站开发建设须知站长工具樱花
  • 临沂个人做网站企业营销策划书范文
  • 网站开发架构一周热点新闻
  • 做亚马逊外国网站需要语言好吗网络营销成功的案例分析
  • thinkphp怎么做网站网络营销意思
  • 怎么样做一家卖东西的网站app开发用什么软件
  • 快速网站搜狗站长平台打不开
  • 高端网站建设公司服务好吗今天新闻头条最新消息
  • 春节网页制作素材宁波seo教程app推广
  • 做女装的网站北京seo招聘信息
  • 网站的百度地图怎么做的慈溪seo排名
  • web网站开发工具app推广是做什么的
  • 全球可以做外贸的社交网站网站安全检测