when i scroll down it always load more the same data? : Can anyone help me? i want to load more data when scroll up and down by using Asyntask.i try to use this code but it load only more 10 data when i scroll down besides that, it displays the same data. it doesn't load new data.
here my code:
<pre>
 

    @Nullable
        @Override
        public View onCreateView(LayoutInflater inflater, final ViewGroup container, Bundle savedInstanceState) {
            view = inflater.inflate(R.layout.home_fragment, container, false);
            arraylist1 = new ArrayList<>();
            adapter = new ListViewAdapter(view.getContext(), R.layout.list_view_adapter, arraylist1);
            listOfNews = (ListView) view.findViewById(R.id.listView);
    
    
            //progress bar
            dialog = new ProgressDialog(HotNewsFrag.this.getActivity());
            dialog.setMessage("Loading News");
            dialog.setCancelable(true);
    
            //class to parse data from json
            new ReadJSON().execute(url);
    
    
            return view;
        }

</pre>
 Adapter
<pre>
 

     public class ListViewAdapter extends ArrayAdapter<HotNews> {
        private final LayoutInflater mInflater;
        Context context;
        ArrayList<HotNews> arrayList;
        ImageView image;
        TextView doer;
        TextView date;
        TextView text;
        Days day = new Days();
        public ListViewAdapter(Context context, int resource, ArrayList<HotNews> arrayList) {
            super(context, resource,arrayList);
            mInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            this.arrayList = arrayList;
            this.context = context;
        }
        @Override
        public int getCount() {
            if(arrayList==null){
                return 0;
            }
            return arrayList.size();
        }
    
        @Override
        public long getItemId(int position) {
            return position;
        }
    
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        final HotNews news;
        View v = convertView;

        if (v==null) {
            v = mInflater.inflate(R.layout.list_view_adapter, parent, false);
        }
        image = (ImageView) v.findViewById(R.id.imagetitle);
        title = (TextView) v.findViewById(R.id.txtTitle);
        doer = (TextView) v.findViewById(R.id.doer);
        date = (TextView) v.findViewById(R.id.txtdate);
        text = (TextView) v.findViewById(R.id.text);

        news = getItem(position);
        Picasso.with(getContext()).load(url + news.getImage()).error(R.drawable.dap).noFade().into(image);

        title.setText(news.getTitle());
        doer.setText("ព័ត៍មានដោយ៖"+news.getDoer());
        date.setText(day.Days(news.getDate())+":"+news.getTime());
        text.setText(news.getContent());

        //set onItemListener
        listOfNews.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                Toast.makeText(getContext(), "Stop Clicking me", Toast.LENGTH_SHORT).show();
                Intent detail= new Intent(getContext(),HotNewsDetail.class);
                    detail.putExtra(newsid,String.valueOf(getItem(position).getId()));
                startActivity(detail);

            }
        });
        listOfNews.setOnScrollListener(new AbsListView.OnScrollListener() {

            @Override
            public void onScrollStateChanged(AbsListView view,
                                             int scrollState) { // TODO Auto-generated method stub
                int threshold = 1;
                int count = listOfNews.getCount();

                if (scrollState == SCROLL_STATE_IDLE) {
                    if (listOfNews.getLastVisiblePosition() >= count
                            - threshold) {
                        // Execute LoadMoreDataTask AsyncTask
                        new ReadJSON().execute(url+"&"+"skip="+10);
                    }
                }
            }

            @Override
            public void onScroll(AbsListView view, int firstVisibleItem,
                                 int visibleItemCount, int totalItemCount) {
                // TODO Auto-generated method stub

            }

        });


        return v;
    }

}

</pre>


