[Solved] I am getting the items in Listview repeated . Here is my sample code I am unable to find the bug in my code ! Can anyone help me out please?


add one more line in your function:

mjob.clear();


private JsonParsingListener<JobList> mJsonListener = new JsonParsingListener<JobList>() {

        @Override
        public void onSuccess(JobList result) {
            if (null == mPagination) {
                mPagination = result.getPagination();
                mPagination.setCurrentPage(0);
                if(null == result.getJobs() || 0 == result.getJobs().size()) {
                    mMessageView.setText(getArguments().getString(ARG_EMPTY_MESSAGE));
                    mMessageView.setVisibility(View.VISIBLE);
                } else {
                    mMessageView.setVisibility(View.GONE);
                }
            } else {
                mPagination.updateData(result.getPagination());
            }

            if (null != mJobs) {
                mJobs.clear();
                mJobs.addAll(result.getJobs());
            } else {
                mJobs = result.getJobs();
            }
            mAdapter.setJobList(mJobs);
            mAdapter.notifyDataSetChanged();
            mIsFetching = false;
        }

11

solved I am getting the items in Listview repeated . Here is my sample code I am unable to find the bug in my code ! Can anyone help me out please?