title: Keeping history of buttons id using android
body: <p>I am learning android programming so be cool with me.
  My question is, i am having for example 5 buttons.User clicks any one button out of 5 and clicks another button.So how to keep track of previously clicked button ids.So the 2nd button clicks output is based on the previous button.</p>
  
  <p>Can any one throw me pointers on that.I am new to java and android.</p>