In my android app, I have a `Button` that changes color of `ViewPager`'s background by changing color stored in `SharedPreference`.

```
@Override
public void onClick(View v) {
    sPref=getPreferences(MODE_PRIVATE);
    int color=sPref.getInt("BACKGROUND", Color.DKGRAY);

    if (color==Color.DKGRAY){
        SharedPreferences.Editor sEdit= sPref.edit();
        sEdit.putInt("BACKGROUND", Color.RED);
        sEdit.commit();
    }
    else{
        SharedPreferences.Editor sEdit= sPref.edit();
        sEdit.putInt("BACKGROUND", Color.DKGRAY);
        sEdit.commit(); 
    }
}

```

Background color is changed in my `ViewPager` like this

```
@Override
public Object instantiateItem(ViewGroup container, int position) {
    LayoutInflater inflater = (LayoutInflater) container.getContext()
            .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View page= inflater.inflate(R.layout.card , null);
    TextView tc= (TextView) page.findViewById(R.id.txtCard);
    tc.setText("Card "+position);
    tc.setBackgroundColor(sPref.getInt("BACKGROUND", Color.DKGRAY));

    ((ViewPager)container).addView(page,0);

    return page;
}

```

**My problem:** When I change background color of my `ViewPager`, since the current page and 2 pages around are already loaded at the time I change background, they don't show change in background. So I want to force render them. Any help please?