title: How to remove this extra space next to a checkbox?
body: <p>First off I am new to android development and some seemingly easy tasks are frustrating me to no end.  This is a follow on question to what was answered here: <a href="https://stackoverflow.com/questions/5207714/changing-the-checkbox-size-in-android-2-0">Changing the checkbox size in Android 2.0</a></p>
  
  <p>The gist of it is that for some reason there is this extra space that keeps showing up next to my checkboxes (See Below).</p>
  
  <p><img src="https://i.stack.imgur.com/bgTV6.jpg" alt="Space Next to checkboxes"></p>
  
  <p>Now I have tried to set the width to 1 and it doesn't get any shorter than what is shown.  I have tried to set the width bigger and I can make the size bigger, but no shorter.  </p>
  
  <p>Please take a look at the code below and let me know what you see.</p>
  
  <pre><code>TableLayout table = (TableLayout) findViewById(R.id.timeEntriesTable);
  
  
          for (int i = 0; i &lt; timeEntries.getLength(); i++)
          {
              Element element = (Element) timeEntries.item(i);
              TableRow tr = new TableRow(this);
              tr.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
  
              CheckBox box = new CheckBox(this);
              box.setButtonDrawable(getResources().getDrawable(R.drawable.checkbox_off_background));
              box.setPadding(0,0,0,0);
              box.setWidth(1);
              box.setOnClickListener(new View.OnClickListener() {
  
                  @Override
                  public void onClick(View v) {
                      CheckBox box = (CheckBox) v;
                      if (box.isChecked())
                      {
                          box.setButtonDrawable(getResources().getDrawable(R.drawable.checkbox_on_background));
                      }
                      else
                      {
                          box.setButtonDrawable(getResources().getDrawable(R.drawable.checkbox_off_background));
                      }
  
                  }
              });
  
              TextView dateBox = new TextView(this);
  
              String dateText = element.getAttribute("date");
              dateBox.setText(dateText);
              dateBox.setTextColor(Color.BLACK);
  
              TextView customerBox = new TextView(this);
  
              String customerName = element.getAttribute("customer");
              customerBox.setText(customerName);
              customerBox.setTextColor(Color.BLACK);
  
              TextView hoursBox = new TextView(this);
  
              String hours = element.getAttribute("hours");
              hoursBox.setText(hours);
              hoursBox.setTextColor(Color.BLACK);
  
              TextView test = new TextView(this);
              test.setTextColor(Color.RED);
              test.setText("Test");
  
              tr.addView(box);                
              tr.addView(dateBox);
              tr.addView(customerBox);
              tr.addView(hoursBox);
  
  
  
              table.addView(tr, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
          }
  </code></pre>
  
  <p>Thank you in advance!</p>