<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorAccentLight"
    android:fillViewport="true"
    android:orientation="vertical"
    tools:context="com.midtrans.sdk.uikit.fragments.UserAddressFragment">

    <android.support.v4.widget.NestedScrollView
        android:id="@+id/addressScrollView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/colorAccentLight"
        android:fillViewport="true"
        tools:context="com.midtrans.sdk.uikit.fragments.UserAddressFragment">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingLeft="@dimen/eight_dp"
            android:paddingRight="@dimen/eight_dp"
            android:paddingTop="@dimen/eight_dp">

            <android.support.v7.widget.CardView
                xmlns:card_view="http://schemas.android.com/apk/res-auto"
                android:id="@+id/billing_address_view"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                card_view:cardCornerRadius="4dp">

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="@android:color/white"
                    android:padding="@dimen/sixteen_dp">

                    <com.midtrans.sdk.uikit.widgets.DefaultTextView
                        android:id="@+id/text_billing"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_centerHorizontal="true"
                        android:layout_marginBottom="@dimen/eight_dp"
                        android:text="@string/billing_address"
                        android:textColor="@android:color/black"
                        android:textSize="@dimen/big_text" />

                    <android.support.design.widget.TextInputLayout
                        android:id="@+id/address_til"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/text_billing">


                        <android.support.v7.widget.AppCompatEditText
                            android:id="@+id/et_address"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:hint="@string/hint_address"
                            android:maxLength="300"
                            android:maxLines="1" />
                    </android.support.design.widget.TextInputLayout>

                    <android.support.design.widget.TextInputLayout
                        android:id="@+id/city_til"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/address_til">

                        <android.support.v7.widget.AppCompatEditText
                            android:id="@+id/et_city"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:hint="@string/hint_city"
                            android:maxLength="100"
                            android:maxLines="1" />
                    </android.support.design.widget.TextInputLayout>

                    <android.support.design.widget.TextInputLayout
                        android:id="@+id/zip_til"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/city_til">

                        <android.support.v7.widget.AppCompatEditText
                            android:id="@+id/et_zipcode"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:hint="@string/hint_zip_code"
                            android:inputType="number"
                            android:maxLength="5"
                            android:maxLines="1" />
                    </android.support.design.widget.TextInputLayout>

                    <android.support.design.widget.TextInputLayout
                        android:id="@+id/country_til"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/zip_til">

                        <android.support.v7.widget.AppCompatAutoCompleteTextView
                            android:id="@+id/et_country"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:hint="@string/hint_country"
                            android:imeOptions="actionDone"
                            android:maxLength="100"
                            android:maxLines="1" />
                    </android.support.design.widget.TextInputLayout>
                </RelativeLayout>
            </android.support.v7.widget.CardView>

            <android.support.v7.widget.CardView
                xmlns:card_view="http://schemas.android.com/apk/res-auto"
                android:id="@+id/shipping_address_view"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/billing_address_view"
                android:layout_marginTop="8dp"
                card_view:cardCornerRadius="4dp">

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="@android:color/white"
                    android:padding="@dimen/sixteen_dp">

                    <com.midtrans.sdk.uikit.widgets.DefaultTextView
                        android:id="@+id/text_shipping"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_centerHorizontal="true"
                        android:layout_marginBottom="@dimen/sixteen_dp"
                        android:text="@string/shipping_address"
                        android:textColor="@android:color/black"
                        android:textSize="@dimen/big_text" />

                    <android.support.v7.widget.SwitchCompat
                        android:id="@+id/cb_shipping_address"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/text_shipping"
                        android:layout_marginBottom="@dimen/sixteen_dp"
                        android:checked="true"
                        android:text="@string/shipping_cb_message" />

                    <RelativeLayout
                        android:id="@+id/shipping_address_container"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/cb_shipping_address"
                        android:visibility="gone">

                        <android.support.design.widget.TextInputLayout
                            android:id="@+id/shipping_address_til"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content">

                            <android.support.v7.widget.AppCompatEditText
                                android:id="@+id/et_shipping_address"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:hint="@string/hint_address"
                                android:inputType="textPostalAddress"
                                android:maxLines="1" />
                        </android.support.design.widget.TextInputLayout>

                        <android.support.design.widget.TextInputLayout
                            android:id="@+id/shipping_city_til"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_below="@id/shipping_address_til">

                            <android.support.v7.widget.AppCompatEditText
                                android:id="@+id/et_shipping_city"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:hint="@string/hint_city"
                                android:inputType="text"
                                android:maxLines="1" />
                        </android.support.design.widget.TextInputLayout>

                        <android.support.design.widget.TextInputLayout
                            android:id="@+id/shipping_zip_til"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_below="@id/shipping_city_til">

                            <android.support.v7.widget.AppCompatEditText
                                android:id="@+id/et_shipping_zipcode"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:hint="@string/hint_zip_code"
                                android:inputType="number"
                                android:maxLines="1" />
                        </android.support.design.widget.TextInputLayout>

                        <android.support.design.widget.TextInputLayout
                            android:id="@+id/shipping_country_til"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_below="@id/shipping_zip_til">

                            <android.support.v7.widget.AppCompatAutoCompleteTextView
                                android:id="@+id/et_shipping_country"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:hint="@string/hint_country"
                                android:imeOptions="actionDone"
                                android:inputType="text"
                                android:maxLines="1" />
                        </android.support.design.widget.TextInputLayout>
                    </RelativeLayout>
                </RelativeLayout>
            </android.support.v7.widget.CardView>
        </RelativeLayout>

    </android.support.v4.widget.NestedScrollView>

    <com.midtrans.sdk.uikit.widgets.FancyButton
        android:id="@+id/btn_next"
        android:layout_width="match_parent"
        android:layout_height="@dimen/button_size"
        android:layout_alignParentBottom="true"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:textColor="@color/white"
        app:fb_defaultColor="@color/gray.primary"
        app:fb_focusColor="@color/colorAccentLight"
        app:fb_text="@string/next"
        app:fb_textGravity="center_vertical"
        app:fb_textSize="16sp" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="@dimen/button_size"
        android:layout_alignParentBottom="true"
        android:gravity="bottom|end">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_marginRight="@dimen/eight_dp"
            android:src="@drawable/ic_arrow_right_white" />
    </LinearLayout>
</RelativeLayout>