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).
Here is what I'm trying to do (The example uses the theme in the Dialogs documentation. That's just an example, what I really try to have is the application theme).
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:
(No blue bar below the title, and wrong title color)
Here is the layout of my custom title:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<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" />
<TextView
android:id="@+id/all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="All" />
<CheckBox
android:id="@+id/checkBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
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.
Any idea?