The Button Next and Previous in My project is not working as expected, Fault is in my Coding but not understanding : My project on Android is to make a table generator 
It works fine until the next and previous Button
like If i input 5 to generate table of 5 , it worked fine
but when i click next the table change to 6 but then no increment 
and on previous the table directly shown is of 4 instead of 5 and then no more decrements.
Help needed to solve this problem 
Thanks in Advance 