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

    <android.support.v7.widget.Toolbar
        android:id="@+id/bt_toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        app:theme="@style/bt_toolbar_theme"/>

    <ViewSwitcher
        android:id="@+id/bt_loading_view_switcher"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:animateLayoutChanges="true">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:gravity="center">

            <ProgressBar
                android:layout_width="@dimen/bt_progress_bar_diameter"
                android:layout_height="@dimen/bt_progress_bar_diameter"
                android:layout_gravity="center"
                android:indeterminate="true"/>

        </LinearLayout>

        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <com.braintreepayments.api.dropin.view.AddCardView
                    android:id="@+id/bt_add_card_view"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="16dp"
                    android:visibility="gone"/>

                <com.braintreepayments.api.dropin.view.EditCardView
                    android:id="@+id/bt_edit_card_view"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="16dp"
                    android:visibility="gone"/>

                <com.braintreepayments.api.dropin.view.EnrollmentCardView
                    android:id="@+id/bt_enrollment_card_view"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="16dp"
                    android:visibility="gone"/>

            </LinearLayout>

        </ScrollView>

    </ViewSwitcher>

</LinearLayout>
