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

Commit 49a4d2a4 authored by Zhaolei's avatar Zhaolei Committed by Gerrit - the friendly Code Review server
Browse files

UI: Fix checkbox item display error status when scrolled ListView

Circular icon gray filling checkbox item when scrolled ListView

Set checkbox status before UI showed

Change-Id: I2c3f74bd76c7cf2e3a417c8f8e3da931d5cbce87
CRs-Fixed: 1091724
parent eafd9644
Loading
Loading
Loading
Loading
+18 −1
Original line number Diff line number Diff line
@@ -1094,7 +1094,24 @@ public class AlertController {

                if (mCursor != null) {
                    adapter = new SimpleCursorAdapter(mContext, layout, mCursor,
                            new String[] { mLabelColumn }, new int[] { R.id.text1 });
                            new String[] { mLabelColumn }, new int[] { R.id.text1 }) {
                        @Override
                        public View getView(int position, View convertView, ViewGroup parent) {
                            View view = super.getView(position, convertView, parent);
                            if (view instanceof CheckedTextView) {
                                final CheckedTextView checkedTextView = (CheckedTextView) view;
                                if (mCheckedItem != -1) {
                                    if (mCheckedItem != position) {
                                        checkedTextView.setChecked(false);
                                    }
                                }

                                return checkedTextView;
                            } else {
                                return view;
                            }
                        }
                    };
                } else if (mAdapter != null) {
                    adapter = mAdapter;
                } else {