Note that there are some explanatory texts on larger screens.

plurals
  1. POEditText in listview lost focus on input text
    primarykey
    data
    text
    <p>On ExpandableListView in child view present EditText "edName". After user change text in EditText, need a) update database b) refresh ExpandableListView group text on new text. </p> <p>My idea is - after finish change text user change focus on next View element. On EditText lost focus i write to database and call notifyDataSetChanged();</p> <p>addTextChangedListener not suitable, need respond after a set of text.</p> <pre><code>public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, android.view.ViewGroup parent) { View view = super.getChildView(groupPosition, childPosition, isLastChild, convertView, parent); final EditText edName = (EditText) view.findViewById(R.id.edName); edName.setOnFocusChangeListener(new OnFocusChangeListener() { public void onFocusChange(View arg0, boolean focusable) { Log.e("Name", "Focusable: " + focusable + " CurValue: " + dataItem.Name + " ETValue: " + edName.getText().toString()); } }); } </code></pre> <p>On View without ExpandableListView EditText lost focus after user touch another place from EditText, but on view with ExpandableListView</p> <p>group expand:</p> <pre><code>10-25 22:52:44.390: E/Name(24403): Focusable: false CurValue: tytyy ETValue: tytyy 10-25 22:52:44.390: E/Name(24403): Focusable: true CurValue: tytyy ETValue: tytyy </code></pre> <p>touch on EditText:</p> <pre><code>10-25 22:54:18.072: E/Name(24403): Focusable: false CurValue: tytyy ETValue: tytyy 10-25 22:54:18.092: E/Name(24403): Focusable: true CurValue: tytyy ETValue: tytyy 10-25 22:54:18.642: E/Name(24403): Focusable: false CurValue: tytyy ETValue: tytyy 10-25 22:54:18.662: E/Name(24403): Focusable: true CurValue: tytyy ETValue: tytyy </code></pre> <p>type "u":</p> <pre><code>10-25 22:54:56.369: E/Name(24403): Focusable: false CurValue: tytyy ETValue: tytyy 10-25 22:54:56.369: E/Name(24403): Focusable: true CurValue: tytyy ETValue: tytyy 10-25 22:54:56.399: E/Name(24403): Focusable: false CurValue: tytyy ETValue: tytyyu 10-25 22:54:56.409: E/Name(24403): Focusable: true CurValue: tytyy ETValue: tytyyu </code></pre> <p>type "i":</p> <pre><code>10-25 22:56:05.557: E/Name(24403): Focusable: false CurValue: tytyy ETValue: tytyyu 10-25 22:56:05.567: E/Name(24403): Focusable: true CurValue: tytyy ETValue: tytyyu 10-25 22:56:05.657: E/Name(24403): Focusable: false CurValue: tytyy ETValue: tytyyui 10-25 22:56:05.657: E/Name(24403): Focusable: true CurValue: tytyy ETValue: tytyyui </code></pre> <p>touch another EditTest:</p> <pre><code>10-25 22:56:44.605: E/Name(24403): Focusable: false CurValue: tytyy ETValue: tytyyui 10-25 22:56:44.665: E/Name(24403): Focusable: true CurValue: tytyy ETValue: tytyyui 10-25 22:56:44.755: E/Name(24403): Focusable: false CurValue: tytyy ETValue: tytyyui 10-25 22:56:44.755: E/Name(24403): Focusable: true CurValue: tytyy ETValue: tytyyui 10-25 22:56:46.787: E/Name(24403): Focusable: false CurValue: tytyy ETValue: tytyyui </code></pre> <p><strong>Why are so many changes in focus?</strong></p> <p><strong>As another way to determine the change in the text?</strong></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload