title: Android app dynamically added button is different colour to layout buttons
body: <p>I'm trying to add a new button to a DialogFragment, and the button is appearing, but the font and colour are completely different to the other buttons.</p>
  
  <p>The other buttons are generated by a LayoutInflater on a layout in an XML file. The buttons in the XML file look like:</p>
  
  <pre><code>&lt;RelativeLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      ... other parts of the layout...
  
      &lt;LinearLayout
      android:id="@+id/LL_buttons"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignTop="@id/RG1"
      android:layout_toRightOf="@id/RG1"
      android:layout_toEndOf="@id/RG1"
      android:layout_marginLeft="30dp"
      android:layout_marginStart="30dp"
      android:orientation="vertical"
      &gt;
      &lt;Button
          android:id="@+id/ok_button"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="@string/fragment_add_custom_target_ok"
  
           /&gt;
  
      &lt;Button
          android:id="@+id/cancel_button"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="@string/fragment_add_custom_target_cancel"
          /&gt;
  &lt;/LinearLayout&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I am then (in some circumstances), adding a delete button as follows:</p>
  
  <pre><code>    public class CustomTargetPickerFragment extends DialogFragment {
  @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
          View v = inflater.inflate(R.layout.fragment_add_custom_target, container, false);
          Dialog dialog=getDialog();
          dialog.setTitle(getString(R.string.custom_target_picker_title));
  
          // Get and process arguments
          Bundle bundle = getArguments();
          if (bundle.getBoolean(TAG_HAS_DELETE)) {
              // Add a delete button
              // Todo: not rendering properly
  
              LinearLayout layout = (LinearLayout) v.findViewById(R.id.LL_buttons);
              Button deleteButton = new Button(getActivity());
              deleteButton.setText(getString(R.string.custom_target_picker_delete_label));
  
              deleteButton.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
              deleteButton.setOnClickListener(DeleteButtonListener);
              layout.addView(deleteButton);
          }
  </code></pre>
  
  <p>What should I be doing to make this new button the same as the ones created by the layout?
  Many thanks</p>