<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:id="@+id/mainFrame"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/md_dialog_frame_margin"
        android:layout_marginBottom="@dimen/md_main_frame_margin"
        android:layout_marginLeft="@dimen/md_dialog_frame_margin"
        android:layout_marginRight="@dimen/md_dialog_frame_margin"
        android:layout_weight="1">

        <LinearLayout
            android:id="@+id/titleFrame"
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:layout_marginBottom="@dimen/md_main_frame_margin">

            <ImageView
                android:id="@+id/icon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:scaleType="fitXY"
                android:layout_marginRight="@dimen/md_icon_margin" />

            <TextView
                android:id="@+id/title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textSize="@dimen/md_title_textsize"
                tools:text="Title" />

        </LinearLayout>

        <com.afollestad.materialdialogs.views.MeasureCallbackScrollView
            android:id="@+id/contentScrollView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:clipToPadding="false">

            <TextView
                android:id="@+id/content"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="@dimen/md_content_textsize"
                tools:text="Content" />

        </com.afollestad.materialdialogs.views.MeasureCallbackScrollView>

    </LinearLayout>

    <LinearLayout
        android:orientation="vertical"
        android:id="@+id/customViewScrollParent"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:visibility="gone">

        <com.afollestad.materialdialogs.views.MeasureCallbackScrollView
            android:id="@+id/customViewScroll"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:clipToPadding="false">

            <LinearLayout
                android:id="@+id/customViewFrame"
                android:orientation="vertical"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingTop="@dimen/md_dialog_frame_margin"
                android:paddingBottom="@dimen/md_dialog_frame_margin"
                android:layout_marginLeft="@dimen/md_dialog_frame_margin"
                android:layout_marginRight="@dimen/md_dialog_frame_margin">

                <LinearLayout
                    android:id="@+id/titleFrameCustomView"
                    android:orientation="horizontal"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center_vertical"
                    android:layout_marginBottom="@dimen/md_main_frame_margin">

                    <ImageView
                        android:id="@+id/iconCustomView"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:scaleType="fitXY"
                        android:layout_marginRight="@dimen/md_icon_margin" />

                    <TextView
                        android:id="@+id/titleCustomView"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:textSize="@dimen/md_title_textsize"
                        tools:text="Title" />

                </LinearLayout>

            </LinearLayout>

        </com.afollestad.materialdialogs.views.MeasureCallbackScrollView>

        <LinearLayout
            android:id="@+id/list_view_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:visibility="gone">

            <com.afollestad.materialdialogs.views.MeasureCallbackListView
                android:id="@+id/contentListView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingBottom="@dimen/md_main_frame_margin"
                android:scrollbarStyle="outsideOverlay"
                android:clipToPadding="false"
                android:divider="@null"
                android:dividerHeight="0dp" />

        </LinearLayout>

    </LinearLayout>

    <View
        android:id="@+id/customViewDivider"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:visibility="gone" />

    <RelativeLayout
        android:id="@+id/buttonDefaultFrame"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginRight="@dimen/md_button_padding_frame_side"
        android:layout_marginBottom="@dimen/md_button_padding_frame_bottom">

        <TextView
            android:id="@+id/buttonDefaultNeutral"
            style="@style/MD_ActionButton"
            android:layout_alignParentLeft="true"
            android:layout_marginLeft="@dimen/md_neutral_button_margin" />

        <!-- toLeftOf rule added from invalidateActions() -->
        <TextView
            android:id="@+id/buttonDefaultNegative"
            style="@style/MD_ActionButton" />

        <TextView
            android:id="@+id/buttonDefaultPositive"
            style="@style/MD_ActionButton"
            android:layout_alignParentRight="true" />

    </RelativeLayout>

    <LinearLayout
        android:id="@+id/buttonStackedFrame"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/md_button_padding_frame_bottom">

        <TextView
            android:id="@+id/buttonStackedPositive"
            style="@style/MD_ActionButtonStacked" />

        <TextView
            android:id="@+id/buttonStackedNegative"
            style="@style/MD_ActionButtonStacked" />

        <TextView
            android:id="@+id/buttonStackedNeutral"
            style="@style/MD_ActionButtonStacked" />

    </LinearLayout>

</LinearLayout>