title: Android Toggle Button custom size/padding/spacing
body: <p>I'm trying to create a custom style for my Android Toggle Buttons. Changing colour and text was no problem but I'm having trouble changing the size/padding/spacing or whatever it is that let them appear so unnecessarily large by default. 
  I've set height to wrap_content and padding and margin to 0, but the size of the button is still as a big as the default Toggle Button. </p>
  
  <p>Does anyone of you know what parameters I've to change to remove to unnecessary spacing between the button's text and border? </p>
  
  <p>Here's a <a href="http://i61.tinypic.com/2ryndvt.png" rel="noreferrer">link</a> to an image of what I want to achive. 
  From left to right: Default ToggleButton, my current ToggleButton and the kind of ToggleButton I want.</p>
  
  <p>Here's my code (as I add those buttons dynamically, no xml)</p>
  
  <pre><code>ToggleButton button = new ToggleButton(getContext());
  button.setLayoutParams(new LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT));
  button.setId(IDCreator.getID());
  button.setText(tag);
  button.setTextOff(tag);
  button.setTextOn(tag);
  button.setGravity(Gravity.LEFT);
  button.setPadding(0, 0, 0, 0);
  button.setBackground(getContext().getResources().getDrawable(R.drawable.toggle_selector));
  </code></pre>
  
  <p>Thanks for your help. Kind regards. </p>
  
  <p>Edit: Image and Code</p>