Building a tabbed layout, and I've got 3 fragment classes, all of them downloads values as `JSON` and populates as a `RecyclerView` .

Now the **problems is :** When I am on a fragment, and switched to another and returns back to the older, I see duplicate of the first, Say if I have one card in a Fragment, when I return back, I get two cards, which are same(Duplicate).

Here is the code:

```
    public class ReceiptFragment extends Fragment
{
    private static String URL_FEE;
    private List<FeePojo> fee = new ArrayList<FeePojo>();
    private RecyclerView feeList;
    CustomFeeAdapter feeAdapter;
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.receipt, container, false);

        feeAdapter = new CustomFeeAdapter(fee);
        SharedPreferences pref = this.getActivity().getSharedPreferences("ActivitySession", Context.MODE_PRIVATE);
        URL_FEE = " https://api.eduknow.info/mobile/fees/buttercup/"+pref.getString("MOB","");
        Log.w("CHECK::",""+URL_FEE);
        feeList = (RecyclerView)rootView.findViewById(R.id.rv_fee);
        LinearLayoutManager llm = new LinearLayoutManager(getActivity());
        feeList.setLayoutManager(llm);
        feeList.setAdapter(feeAdapter);

        JsonArrayRequest feeReq = new JsonArrayRequest(URL_FEE,
                new Response.Listener<JSONArray>() {
                    @Override
                    public void onResponse(JSONArray response) {
                        Log.d("EDUKNOW::FEE", response.toString());
                        //hidePDialog();

                        SharedPreferences Tempx = getActivity().getSharedPreferences("ActivitySession", Context.MODE_PRIVATE);
                        SharedPreferences.Editor edx = Tempx.edit();
                        edx.putString("GSON_FEE", response.toString());
                        edx.apply();

                        Gson gson = new Gson();
                        JsonParser parser = new JsonParser();
                        JsonArray jArray = parser.parse(Tempx.getString("GSON_FEE","")).getAsJsonArray();

                        //ArrayList<MainPojo> uid = new ArrayList<MainPojo>();

                        for(JsonElement obj : jArray )
                        {
                            FeePojo cse = gson.fromJson( obj , FeePojo.class);
                            fee.add(cse);

                        }
                        Log.w("EDUKNO::CHECK",""+fee.get(0).getSchoolName());
                        feeAdapter.notifyDataSetChanged();

                        // Parsing json

                    }
                }, new Response.ErrorListener() {
            @Override
            public void onErrorResponse(VolleyError error)
            {
                SharedPreferences Tempx = getActivity().getSharedPreferences("ActivitySession", Context.MODE_PRIVATE);

                Gson gson = new Gson();
                JsonParser parser = new JsonParser();
                JsonArray jArray = parser.parse(Tempx.getString("GSON_FEE","")).getAsJsonArray();

                //ArrayList<MainPojo> uid = new ArrayList<MainPojo>();

                for(JsonElement obj : jArray )
                {
                    FeePojo cse = gson.fromJson( obj , FeePojo.class);
                    fee.add(cse);
                    feeAdapter.notifyDataSetChanged();
                }

                VolleyLog.d("EDUKNOW::::", "Error: " + error.getMessage());
                //hidePDialog();

            }
        });

        // Adding request to request queue
        AppController.getInstance().addToRequestQueue(feeReq);

        return rootView;
    }
}

```

What might be **possibly causing this?** And whats the best alternative to fix this? Thanks! 

> 
> PS: There is no error/warnings in the Logcat
> 
> 
>