title: Center button in custom view
body: <p>I've searched the Internet and these forums but am unable to find the answer to my problem.</p>
  
  <p>I have a custom view with a WebView, which resizes to the user's screen size (simulates a maximize), with 3 buttons at the top of the custom view.</p>
  
  <p>These buttons are centered, but as the view resizes they stay where they are, resulting in them no longer being centered.</p>
  
  <p>How can I center a button in a custom view?</p>
  
  <p>I do not need to do this every time the screen is resized, as I can just center the buttons in the method call. </p>
  
  <p>Any help is greatly appreciated!</p>