title: Views and layout elements displayed conditionally
body: <p>I am semi-new to android development. I am getting ready to design a project that has a button that has 2 different methods when clicked (effectively a toggle). I know I can do this by implementing OnClickListener myself, but I was wondering if there was a way to make 2 different buttons in the layout xml and then conditionally show one or the other appropriately. Also if this is possible, is it generally a good practice, or is there a better way to have a button perform two different methods? Is it easier overall to just go ahead and implement OnClickListener?</p>
  
  <p>Thanks</p>
  
  <p>(I currently don't have any code to show at the moment, but if my question is vague I'll be happy to elaborate more if necessary)</p>