title: setOnFocusChangeListener - Triggers after each character
body: <p>I have the following custom base adapter. I have a listview with a edittext on each item. I want to save that data as soon as the user leaves the edittext, but what happens now is that each time the user types in 1 char, the setOnFocusChangeListener triggers. I really don't know why this is happening.</p>
  
  <p>My custom base adapter class</p>
  
  <pre><code>public class ChecklistBaseAdapter extends BaseAdapter {
  private static ArrayList&lt;Checklist&gt; searchArrayList;
  Context currentcontext;
  DatabaseHandler db;
  private LayoutInflater mInflater;
  
  public ChecklistBaseAdapter(Context context, ArrayList&lt;Checklist&gt; results) {
  
      searchArrayList = results;
      mInflater = LayoutInflater.from(context);
      currentcontext = context;
      db = new DatabaseHandler(currentcontext);
  }
  
  public int getCount() {
  
      return searchArrayList.size();
  }
  
  public void remove(int position) {
  
      searchArrayList.remove(position);
      notifyDataSetChanged();
  }
  
  public void removeAll() {
  
      searchArrayList.clear();
      notifyDataSetChanged();
  }
  
  public void add(Checklist checklist) {
      searchArrayList.add(checklist);
  
      notifyDataSetChanged();
  }
  
  public void notifyChange() {
      notifyDataSetChanged();
  }
  
  public Object getItem(int position) {
  
      return searchArrayList.get(position);
  
  }
  
  public long getItemId(int position) {
  
      return position;
  }
  
  public View getView(int position, View convertView, ViewGroup parent) {
  
      final ViewHolder holder;
      if (convertView == null) {
          convertView = mInflater.inflate(R.layout.checklistitem, null);
          holder = new ViewHolder();
  
          holder.cbStatus = (CheckBox) convertView
                  .findViewById(R.id.checkbox);
          holder.etName = (EditText) convertView.findViewById(R.id.editname);
  
          convertView.setTag(holder);
      } else {
          holder = (ViewHolder) convertView.getTag();
      }
      Checklist checklist = (Checklist) getItem(position);
  
      holder.etName.setText(checklist.getName());
  
      holder.etName.setId(position);
      if (searchArrayList.get(position).getStatus().equals("F")) {
          holder.cbStatus.setChecked(false);
      } else {
          holder.cbStatus.setChecked(true);
      }
  
      holder.etName.setOnEditorActionListener(new OnEditorActionListener() {
  
          @Override
          public boolean onEditorAction(TextView v, int actionId,
                  KeyEvent event) {
  
              if (actionId == EditorInfo.IME_ACTION_DONE) {
                  int myint = v.getId();
                  searchArrayList.get(myint)._name = v.getText().toString();
                  return true;
  
              }
              return false;
          }
      });
      holder.etName
              .setOnFocusChangeListener(new OnFocusChangeListener() {
                  @Override
                  public void onFocusChange(View v, boolean hasFocus) {
                      String input;
                      EditText editText;
  
                      if (!hasFocus) {
                          Log.e("test", "test123");
                          int myint = v.getId();
                          editText = (EditText) v;
                          input = editText.getText().toString();
                          searchArrayList.get(myint)._name = input;
  
                      }
                  }
              });
  
      holder.cbStatus
              .setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
                  @Override
                  public void onCheckedChanged(CompoundButton buttonView,
                          boolean isChecked) {
                      String name = holder.etName.getText().toString().trim();
                      if (isChecked) {
                          for (int x = 0; x &lt; searchArrayList.size(); x++) {
                              Checklist checklist = new Checklist();
                              checklist = searchArrayList.get(x);
                              if (name.equals(checklist.getName())) {
                                  checklist.setStatus("T");
                                  db.updateCheckList(checklist);
                                  searchArrayList.set(x, checklist);
                              }
                          }
                      } else {
                          for (int x = 0; x &lt; searchArrayList.size(); x++) {
                              Checklist checklist = new Checklist();
                              checklist = searchArrayList.get(x);
                              if (name.equals(checklist.getName())) {
                                  checklist.setStatus("F");
                                  searchArrayList.set(x, checklist);
                                  db.updateCheckList(checklist);
                              }
                          }
                      }
                  }
              });
  
      return convertView;
  }
  
  static class ViewHolder {
  
      CheckBox cbStatus;
      EditText etName;
  
  }
  </code></pre>
  
  <p>}</p>