I am developing an app which has an expandable list (that i use as a table i.e. all children have the same name-column) where each item is like this one:<?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=55dip    android:orientation=horizontal >    <TextView       android:id=@+id/activity_main_expandable_list_item_title       android:layout_weight=5       android:layout_width=0dp       android:layout_height=wrap_content       android:textSize=17sp       ... />    <EditText       android:id=@+id/activity_main_expandable_list_item_edit_text       android:layout_weight=12       android:layout_width=0dp       android:layout_height=wrap_content       android:inputType=textFilter       android:hint=@string/activity_main_edit_text_hint />and each group is a layout with a textView.I keep these structuresprivate List<String> _list_rows_names;private List<String> _list_col_names;private List<List<String>> edit_text_data;    where the first one keeps the group-row names, the second one keeps the children-column names and the third one keeps the data typed in the editText of each child.getChildView is as follows:public View getChildView(final int groupPosition, final int childPosition,                             boolean isLastChild, View convertView, ViewGroup parent) {        final String childText = (String) getChild(groupPosition, childPosition);        if (convertView == null) {            LayoutInflater infalInflater = (LayoutInflater) this._context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);            convertView = infalInflater.inflate(R.layout.expandable_list_item, parent, false);        }        final TextView txtListChild = (TextView) convertView.findViewById(R.id.activity_main_expandable_list_item_title);        final EditText edtxtListChild = (EditText) convertView.findViewById(R.id.activity_main_expandable_list_item_edit_text);        edtxtListChild.setOnFocusChangeListener(new View.OnFocusChangeListener() {            @Override            public void onFocusChange(View view, boolean b) {                if (!b){                    String typed_value = edtxtListChild.getText().toString();                    String stored_value = edit_text_data.get(groupPosition).get(childPosition);                    if (stored_value.equals(typed_value)) return;                    edit_text_data.get(groupPosition).set(childPosition, typed_value);                }            }        });        if (!txtListChild.getText().equals(childText)) txtListChild.setText(childText);        String stored_value = edit_text_data.get(groupPosition).get(childPosition);        if (!edtxtListChild.getText().toString().equals(stored_value)) edtxtListChild.setText(stored_value);        return convertView;    }Row and columns are in the range of 5-15.Problem is when a configuration change occurs (orientation change) everything is initialized again and all of my data are lost. My options to keep the data and restore them are: 1) Bundles 2) local files 3) local database 4) remote database 5) Have a service running that keeps the dataI think that the best solution is the service running, as i do a lot of queries (by expanding rows) that will slow down performance.Is there any other better choice?
Android Expandable list with edit texts. data store
android