ViewPager adding button on click


Well, I have buttons on layout of my viewPager

I am controlling buttons in

But there is a problem, When clicked a button in a page, It affects to previous page button.
For example after clicking I want to change color of button with this code:

but after clicking, the previos page button color is changing
I dont understand how is problem, is this.