title: How to set AlertDialog custom title top margin and remove unwanted Padding?
body: <p>I am stuck with a <code>margin</code> and <code>padding</code> issue of a title of <code>AlertDialog.Builder</code>,  what i am doing is i want the title in <code>center</code> so i am using <code>setCustomTitle</code> i am able to do so but stuck with margin and padding of it. I don't want unwanted padding which is showing and also i want to set some top margin to title, i am using <code>LinearLayout.LayoutParams</code> but it has no effect. please suggest what to do to handle it.thanks</p>
  
  <p>Code :</p>
  
  <pre><code>dialog = new AlertDialog.Builder(context, R.style.DialogTheme);
  TextView title = new TextView(context);
  title.setTextColor(ContextCompat.getColor(context, R.color.black));
  title.setTextSize(TypedValue.COMPLEX_UNIT_SP, 20);
  title.setTypeface(Typeface.DEFAULT_BOLD);
  LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
  lp.setMargins(0, 20, 0, 0);
  title.setLayoutParams(lp);
  title.setText("Dialog");
  title.setGravity(Gravity.CENTER);
  dialog.setCustomTitle(title);
  dialog.setMessage("Dialog box with custom title view ");
  dialog.setCancelable(false);
  dialog.setPositiveButton("OK", new DialogInterface.OnClickListener() {
      @Override
      public void onClick(DialogInterface dialog, int which) {
  
      }
  });
  dialog.show();
  </code></pre>
  
  <p>Result :<a href="https://i.stack.imgur.com/DBbGw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DBbGw.png" alt="enter image description here"></a></p>