<?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:id="@+id/bgLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white"
    android:orientation="vertical">

    <com.google.android.material.appbar.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/transparent"
        android:theme="@style/AppTheme.AppBarOverlay">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?android:attr/actionBarSize"
            android:background="#ffffff"
            app:contentInsetLeft="0dp"
            app:contentInsetStart="0dp"
            app:popupTheme="@style/AppTheme.PopupOverlay">

            <TextView
                android:id="@+id/title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:ellipsize="marquee"
                android:gravity="center"
                android:marqueeRepeatLimit="marquee_forever"
                android:scrollHorizontally="true"
                android:singleLine="true"
                android:textColor="@color/btn_bg_color"
                android:textSize="@dimen/textSize"
                android:textStyle="bold" />

            <ImageButton
                android:id="@+id/helpIcon"
                android:layout_width="@dimen/buttonHeightNormal"
                android:layout_height="@dimen/buttonHeightNormal"
                android:layout_gravity="center|right"
                android:layout_marginRight="@dimen/textSizeSmall"
                android:background="@android:color/transparent"
                android:contentDescription="@string/action_submit"
                android:padding="2dp"
                android:scaleType="fitCenter"
                android:src="@mipmap/help_icon"
                android:visibility="gone" />

        </androidx.appcompat.widget.Toolbar>

    </com.google.android.material.appbar.AppBarLayout>

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="0.85">

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

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="150dp"
                android:baselineAligned="false"
                android:minHeight="@dimen/timerSize"
                android:orientation="vertical">


                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_margin="@dimen/seekbarsize"
                    android:orientation="vertical"
                    android:weightSum="1">

                    <ImageView
                        android:id="@+id/product_image"
                        android:layout_width="match_parent"
                        android:layout_height="0dp"
                        android:layout_weight="1"
                        android:background="@android:color/transparent"
                        android:contentDescription="@string/app_name"
                        android:scaleType="fitCenter" />

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_gravity="right"
                        android:layout_marginRight="@dimen/textSizeSmall"
                        android:gravity="right"
                        android:orientation="horizontal">

                        <TextView

                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_gravity="center"
                            android:ellipsize="end"
                            android:gravity="right"
                            android:marqueeRepeatLimit="marquee_forever"
                            android:maxLines="2"
                            android:paddingLeft="@dimen/seekbarsize"
                            android:text="Price:"
                            android:textColor="@color/material_black"
                            android:textSize="@dimen/textSizeSmall" />

                        <TextView
                            android:id="@+id/redeem_price"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_gravity="center"
                            android:ellipsize="end"
                            android:gravity="right|center"
                            android:marqueeRepeatLimit="marquee_forever"
                            android:maxLines="2"
                            android:paddingLeft="@dimen/seekbarsize"
                            android:text=""
                            android:textColor="@color/bg_color"
                            android:textSize="@dimen/textSizeAverage"
                            android:textStyle="bold" />
                    </LinearLayout>

                </LinearLayout>


            </LinearLayout>

            <TextView
                android:layout_width="match_parent"
                android:layout_height="2dp"
                android:layout_marginLeft="@dimen/textSizeSmall"
                android:layout_marginTop="@dimen/seekbarsize"
                android:layout_marginRight="@dimen/textSizeSmall"
                android:background="@color/material_grey200" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"

                android:baselineAligned="false"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/productTitle"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/seekbarsize"
                    android:background="@color/material_white"
                    android:gravity="center|left"
                    android:padding="@dimen/seekbarsize"
                    android:textColor="@color/material_black"
                    android:textSize="@dimen/textSizeAverage"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/productDesc"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:autoLink="all"
                    android:background="@color/material_white"
                    android:padding="@dimen/textSizeToSmall"
                    android:scrollbars="vertical"
                    android:textColor="@color/material_black"
                    android:textSize="@dimen/textSizeSmall" />

                <TextView
                    android:id="@+id/terms_link"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="right"
                    android:background="@color/material_white"
                    android:gravity="right"
                    android:paddingLeft="@dimen/textSizeToSmall"
                    android:paddingRight="@dimen/textSizeToSmall"
                    android:paddingBottom="@dimen/textSizeToSmall"
                    android:scrollbars="vertical"
                    android:text="Terms and Conditions"

                    android:textColor="#2869db"
                    android:textSize="@dimen/textSizeSmall"
                    android:visibility="visible" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:baselineAligned="false"
                android:gravity="center"
                android:orientation="vertical">

                <!--<com.android.horizontallistview.horizontallistview-->
                <!--android:id="@+id/pricelist"-->
                <!--android:layout_width="match_parent"-->
                <!--android:layout_height="match_parent"-->
                <!--android:layout_gravity="center_vertical"/>-->
                <LinearLayout
                    android:id="@+id/range"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="horizontal"
                    android:visibility="gone">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/textSizeSmall"
                        android:gravity="center_vertical"
                        android:padding="@dimen/seekbarsize_small"
                        android:text="Enter Price :"
                        android:textColor="@color/material_black"
                        android:textSize="@dimen/textSizeAverage" />

                    <EditText
                        android:id="@+id/edit_price"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/seekbarsize"
                        android:layout_marginRight="@dimen/textSize"
                        android:background="@drawable/border_grey"
                        android:inputType="number"
                        android:padding="@dimen/seekbarsize_small" />


                </LinearLayout>

                <LinearLayout
                    android:id="@+id/slab"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="vertical"
                    android:visibility="invisible">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/textSize"
                        android:layout_marginTop="@dimen/seekbarsize"
                        android:layout_marginRight="@dimen/seekbarsize"
                        android:layout_marginBottom="@dimen/seekbarsize"
                        android:text="Select Range"
                        android:textColor="@color/material_black"
                        android:textSize="@dimen/textSizeAverage" />

                    <HorizontalScrollView
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_gravity="center"
                        android:layout_margin="@dimen/seekbarsize_small"
                        android:scrollbarSize="3dp">

                        <LinearLayout
                            android:id="@+id/priceList"
                            android:layout_width="wrap_content"
                            android:layout_height="match_parent"
                            android:layout_margin="@dimen/seekbarsize_small"
                            android:layout_weight="1"

                            android:orientation="horizontal">


                        </LinearLayout>
                    </HorizontalScrollView>
                </LinearLayout>
            </LinearLayout>

        </LinearLayout>
    </ScrollView>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="@dimen/timerSize"
        android:layout_gravity="center"
        android:gravity="center"
        android:orientation="vertical">

        <TextView
            android:id="@+id/total_earned_points"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:ellipsize="end"
            android:gravity="center"
            android:text="Available Points: Rs 5000"
            android:textColor="@color/btn_bg_color"
            android:textSize="@dimen/textSizeAverage"
            android:textStyle="bold"
            android:visibility="gone" />

        <Button
            android:id="@+id/btn_purchase"
            android:layout_width="@dimen/layoutsize"
            android:layout_height="@dimen/buttonHeightNormal"
            android:layout_marginTop="@dimen/textSizeSmall"
            android:background="@drawable/border_login_button"
            android:text="Redeem now"
            android:textColor="@color/btn_bg_color"
            android:textSize="@dimen/textSizeSmall"
            android:textStyle="bold" />


    </LinearLayout>


</LinearLayout>