Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a895b79c authored by Muthu Ramadoss's avatar Muthu Ramadoss
Browse files
Fixed AlertDialog.Builder setMultiChoiceItems losing checked state for invisible items in UI
when backed by a Cursor. Please refer to the issue tracker for more details.
parent 9b68d54c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -784,6 +784,9 @@ public class AlertController {
                                Cursor cursor) {
                            CheckedTextView text = (CheckedTextView) view.findViewById(R.id.text1);
                            text.setText(cursor.getString(cursor.getColumnIndexOrThrow(mLabelColumn)));
                            if (cursor.getInt(cursor.getColumnIndexOrThrow(mIsCheckedColumn)) == 1) {
                                listView.setItemChecked(cursor.getPosition(), true);
                            }
                        }
    
                        @Override
@@ -792,9 +795,6 @@ public class AlertController {
                            View view = mInflater.inflate(
                                    R.layout.select_dialog_multichoice, parent, false);
                            bindView(view, context, cursor);
                            if (cursor.getInt(cursor.getColumnIndexOrThrow(mIsCheckedColumn)) == 1) {
                                listView.setItemChecked(cursor.getPosition(), true);
                            }
                            return view;
                        }