<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/content_promo_compliance"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context="cpm.com.gskmtorange.gsk_dailyentry.PromoComplianceActivity"
    tools:showIn="@layout/activity_promo_compliance">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true">

        <TextView
            android:id="@+id/txt_promoComplianceName"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="#FFF1710F"
            android:paddingBottom="10dp"
            android:paddingLeft="20dp"
            android:paddingTop="10dp"
            android:text="@string/title_activity_promo_compliance"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textColor="@android:color/black"
            android:visibility="gone" />

        <ScrollView
            android:id="@+id/scrollView_promoCompliance"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_alignParentTop="true">

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

                <!--Promo sku List-->
                <LinearLayout
                    android:id="@+id/lin_promo_sku"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical" />

                <View
                    android:id="@+id/view_promo_sku"
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="@color/colorPrimaryDark" />

                <!--Add Additional layout-->
                <android.support.v7.widget.CardView
                    android:id="@+id/card_view"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_margin="5dp"
                    card_view:cardCornerRadius="10dp">

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

                        <!--Additional Promo-->
                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="0dp"
                            android:layout_weight="1"
                            android:background="@color/colorPrimaryDark"
                            android:orientation="vertical">

                            <TextView
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:paddingBottom="5dp"
                                android:paddingLeft="10dp"
                                android:paddingTop="5dp"
                                android:text="@string/promo_compliance_additional_promo"
                                android:textAppearance="?android:attr/textAppearanceSmall"
                                android:textColor="@color/black" />
                        </LinearLayout>

                        <!--Promo Spinner-->
                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="0dp"
                            android:layout_marginTop="5dp"
                            android:layout_weight="1"
                            android:orientation="horizontal"
                            android:weightSum="2">

                            <TextView
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_gravity="center_vertical"
                                android:layout_weight=".8"
                                android:paddingBottom="5dp"
                                android:paddingLeft="10dp"
                                android:paddingTop="5dp"
                                android:text="@string/promo_compliance_promo"
                                android:textAppearance="?android:attr/textAppearanceSmall"
                                android:textColor="@color/black" />

                            <Spinner
                                android:id="@+id/sp_promo"
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_weight="1.2" />
                        </LinearLayout>

                        <!--InStock, Promo Announcer, Running on Pos-->
                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="0dp"
                            android:layout_marginTop="5dp"
                            android:layout_weight="1"
                            android:orientation="horizontal"
                            android:weightSum="3">

                            <LinearLayout
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_weight="1"
                                android:gravity="center"
                                android:orientation="vertical"
                                android:weightSum="5">

                                <LinearLayout
                                    android:layout_width="match_parent"
                                    android:layout_height="0dp"
                                    android:layout_weight="2"
                                    android:orientation="vertical">

                                    <TextView
                                        android:layout_width="match_parent"
                                        android:layout_height="wrap_content"
                                        android:paddingLeft="10dp"
                                        android:text="@string/promo_compliance_inStock"
                                        android:textAppearance="?android:attr/textAppearanceSmall" />
                                </LinearLayout>

                                <LinearLayout
                                    android:layout_width="match_parent"
                                    android:layout_height="0dp"
                                    android:layout_weight="3"
                                    android:gravity="center_horizontal"
                                    android:orientation="vertical">

                                    <ToggleButton
                                        android:id="@+id/toggle_add_InStock"
                                        android:layout_width="wrap_content"
                                        android:layout_height="wrap_content"
                                        android:background="@drawable/toggle_selector_background"
                                        android:textOff="@string/no"
                                        android:textOn="@string/yes"/>
                                </LinearLayout>
                            </LinearLayout>

                            <LinearLayout
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_weight="1"
                                android:gravity="center"
                                android:orientation="vertical"
                                android:weightSum="5">

                                <LinearLayout
                                    android:layout_width="match_parent"
                                    android:layout_height="0dp"
                                    android:layout_weight="2"
                                    android:orientation="vertical">

                                    <TextView
                                        android:layout_width="match_parent"
                                        android:layout_height="wrap_content"
                                        android:paddingLeft="10dp"
                                        android:text="@string/promo_compliance_promoAnnouncer"
                                        android:textAppearance="?android:attr/textAppearanceSmall" />
                                </LinearLayout>

                                <LinearLayout
                                    android:layout_width="match_parent"
                                    android:layout_height="0dp"
                                    android:layout_weight="3"
                                    android:gravity="center_horizontal"
                                    android:orientation="vertical">

                                    <ToggleButton
                                        android:id="@+id/toggle_add_promoAnnouncer"
                                        android:layout_width="wrap_content"
                                        android:layout_height="wrap_content"
                                        android:background="@drawable/toggle_selector_background"
                                        android:textOff="@string/no"
                                        android:textOn="@string/yes" />
                                </LinearLayout>
                            </LinearLayout>

                            <LinearLayout
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_weight="1"
                                android:gravity="center"
                                android:orientation="vertical"
                                android:weightSum="5">

                                <LinearLayout
                                    android:layout_width="match_parent"
                                    android:layout_height="0dp"
                                    android:layout_weight="2"
                                    android:orientation="vertical">

                                    <TextView
                                        android:layout_width="match_parent"
                                        android:layout_height="wrap_content"
                                        android:paddingLeft="10dp"
                                        android:text="@string/promo_compliance_runningPOS"
                                        android:textAppearance="?android:attr/textAppearanceSmall" />
                                </LinearLayout>

                                <LinearLayout
                                    android:layout_width="match_parent"
                                    android:layout_height="0dp"
                                    android:layout_weight="3"
                                    android:gravity="center_horizontal"
                                    android:orientation="vertical">

                                    <ToggleButton
                                        android:id="@+id/toggle_add_runningPos"
                                        android:layout_width="wrap_content"
                                        android:layout_height="wrap_content"
                                        android:background="@drawable/toggle_selector_background"
                                        android:textOff="@string/no"
                                        android:textOn="@string/yes" />
                                </LinearLayout>
                            </LinearLayout>
                        </LinearLayout>

                        <!--Add Button-->
                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="0dp"
                            android:layout_marginTop="5dp"
                            android:layout_weight="1"
                            android:orientation="vertical"
                            android:paddingRight="15dp">

                            <Button
                                android:id="@+id/btn_add"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_gravity="center"
                                android:background="@color/colorPrimaryDark"
                                android:text="@string/promo_compliance_add"
                                android:textColor="@color/white" />
                        </LinearLayout>

                    </LinearLayout>
                </android.support.v7.widget.CardView>

                <!--Additional List-->
                <View
                    android:id="@+id/view_additional_promo"
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="@color/colorPrimaryDark" />

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

            </LinearLayout>

        </ScrollView>
    </LinearLayout>
</RelativeLayout>
