有些时候事情往往不会像你想像的那么简单
开发过程中,我们会遇到ListView的Item里面含有Edittext的情况,希望将edittext对应的数据存到对应的条目中,比如每个商品都需要在评价的时候,留有评价信息,也就是在书写评价的时候,就将对应的评价信息放到对应商品信息中,这样避免因为Adapter在notifydatachanged刷新,所以用到了addTextChangeListener这个监听事件,在其中的方法中用来记录.下面列举其中遇到的问题:
1.焦点问题
下面是item的代码
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/tv"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
在这里写上一个edittext
<EditText
an