filtering custom adapter IndexOutOfBoundsException

前端 未结 4 1367
伪装坚强ぢ
伪装坚强ぢ 2021-01-18 00:05

I\'m novice at android.

My custom Adapter cause exception when filtering.

here is my code. private class DeptAdapter extends ArrayAdapter implements Filter

4条回答
  •  情深已故
    2021-01-18 00:40

     private ArrayList items;
        private ArrayList mOriginalValues;
    
        public DeptAdapter(Context context, int textViewResourceId, ArrayList items) {
                super(context, textViewResourceId, items);
                this.items = items;
                this.mOriginalValues=items;  //add this line in your code
        }
    

提交回复
热议问题