title: Android: Using default style in a custom dialog title
body: <p>I'm trying to create a custom multiple choice alert dialog that allows the user to select/deselect all items in one click.
  I achieve this using a custom title with an additional checkbox.
  Everything works fine except that I don't know how to make my custom title looking like the default alert dialog title (using the same style).</p>
  
  <p>Here is what I'm trying to do (The example uses the theme in the <a href="http://developer.android.com/guide/topics/ui/dialogs.html" rel="noreferrer">Dialogs documentation</a>. That's just an example, what I really try to have is the application theme).</p>
  
  <p><img src="https://i.stack.imgur.com/2wOsV.png" alt="enter image description here"></p>
  
  <p>I created a custom view for the custom title I use, but I don't know how to get the attributes of the default style title bar, so, I obtain:</p>
  
  <p><img src="https://i.stack.imgur.com/gpCb5.png" alt="enter image description here"></p>
  
  <p>(No blue bar below the title, and wrong title color)</p>
  
  <p>Here is the layout of my custom title:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent" &gt;
  
  &lt;TextView
      android:id="@+id/title"
      style="?android:attr/textAppearanceLarge"
      android:layout_width="0dp"
      android:layout_height="wrap_content"
      android:layout_weight="1"
      android:text="Dialog title" /&gt;
  
  &lt;TextView
      android:id="@+id/all"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="All" /&gt;
  
  &lt;CheckBox
      android:id="@+id/checkBox"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>It seems obvious to me that I need to define the title attributes, and the background of the layout ... but I'm crawling the web since hours searching how to get the attributes of default title view.</p>
  
  <p>Any idea?</p>