大佬教程收集整理的这篇文章主要介绍了Android-7.0:编辑器actionlistener中的EditText错误的actionId,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
<EditText android:id="@+id/ui_row_create_poll_edit_text_txt_name" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_marginLeft="@dimen/margin_normal" android:layout_toLeftOf="@id/ui_row_create_task_user_info" android:BACkground="@android:color/transparent" android:paddingBottom="@dimen/padding_large_plus_little" android:paddingLeft="@dimen/padding_large_plus_little" android:paddingTop="@dimen/padding_large_plus_little" android:singleLine="true" android:maxLength="@Integer/task_length" android:imeOptions="actionNext" android:textColor="@color/black" android:textSize="@dimen/font_very_large"/>
在代码中我添加了这样的Editor actionlistener.
public Boolean onEditOraction(TextView v,int actionId,KeyEventevent{ if (actionId == EditorInfo.IME_ACTION_DONE || actionId == EditorInfo.IME_ACTION_NEXT) { listener.onActionDone(option,etOption); }
在Api< 24我得到actionId作为EditorInfo.IME_ACTION_NEXT,它工作正常.但是当我在Android 7.0上运行我的应用程序时,我将actionId作为EditorInfo.IME_ACTION_IME_ACTION_UNSPECIFIED
有人可以指出为什么我在Api-24中获得不同的actionId.
如果Android-7.0中的editText有任何变化,请指点我的@L_874_6@.
谢谢.
注意:我的editText放在listview中
以上是大佬教程为你收集整理的Android-7.0:编辑器actionlistener中的EditText错误的actionId全部内容,希望文章能够帮你解决Android-7.0:编辑器actionlistener中的EditText错误的actionId所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。