<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: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"
            android:elevation="@dimen/seekbarsize_small"
            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:gravity="center"
                android:scrollHorizontally="true"
                android:singleLine="true"
                android:text="My Reward Points"
                android:textAllCaps="true"
                android:textColor="@color/btn_bg_color"
                android:textSize="@dimen/textSizeAverage"
                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="invisible" />

        </androidx.appcompat.widget.Toolbar>

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

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"

        android:orientation="vertical">

        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="0dip"
            android:layout_weight="0.43"
            android:background="#ffffff">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="0dip"
                android:layout_gravity="center_horizontal"
                android:layout_weight="0.4"
                android:background="#ffffff"
                android:gravity="center_horizontal"
                android:orientation="vertical">

                <FrameLayout
                    android:layout_width="120dp"
                    android:layout_height="70dp"
                    android:layout_marginTop="@dimen/seekbarsize_small">

                    <ImageView
                        android:layout_width="@dimen/buttonHeightLarge"
                        android:layout_height="70dp"
                        android:layout_gravity="left"
                        android:background="@android:color/transparent"
                        android:contentDescription="@string/action_submit"
                        android:scaleType="fitCenter"
                        android:src="@mipmap/star" />

                    <com.ttiglobal.inttilectgpchat.autofit.AutofitTextView
                        android:id="@+id/points"
                        android:layout_width="@dimen/buttonHeightLarge"
                        android:layout_height="@dimen/buttonHeightSmall"
                        android:layout_gravity="right|bottom"
                        android:gravity="left|center"
                        android:maxLines="1"
                        android:singleLine="true"
                        android:textAllCaps="true"
                        android:textColor="@color/btn_bg_color"
                        android:textSize="@dimen/textSize"
                        android:textStyle="bold"
                        app:minTextSize="6sp" />

                </FrameLayout>
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:gravity="center">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="@dimen/buttonHeightSmall"
                        android:layout_gravity="center"
                        android:gravity="center"
                        android:scrollHorizontally="true"
                        android:singleLine="true"
                        android:text="Points Available"
                        android:textColor="@color/material_black"
                        android:textSize="@dimen/textSizeSmall"
                        android:textStyle="bold" />

                    <ImageView
                        android:id="@+id/info"
                        android:layout_width="@dimen/buttonHeightNormal"
                        android:layout_height="@dimen/buttonHeightNormal"
                        android:layout_gravity="center"
                        android:gravity="center"
                        android:visibility="gone"
                        android:src="@mipmap/info_icon" />
                </LinearLayout>

                <TextView
                    android:id="@+id/earned"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:layout_marginTop="@dimen/seekbarsize_small"
                    android:gravity="center"
                    android:scrollHorizontally="true"
                    android:singleLine="true"
                    android:textColor="@color/btn_bg_color"
                    android:textSize="@dimen/textSizeSmall"
                    android:textStyle="bold" />

                <Button
                    android:id="@+id/btn_redeem"
                    android:layout_width="wrap_content"
                    android:layout_height="@dimen/buttonHeightNormal"
                    android:layout_marginTop="@dimen/seekbarsize"
                    android:background="@drawable/border_login_button"
                    android:paddingLeft="@dimen/textSizeToSmall"
                    android:paddingRight="@dimen/textSizeToSmall"
                    android:text="Transfer to Wallet"
                    android:textColor="@color/btn_bg_color"
                    android:textSize="@dimen/textSizeSmall"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/text_message"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:layout_marginTop="@dimen/seekbarsize"
                    android:gravity="center"
                    android:layout_marginBottom="@dimen/seekbarsize"
                    android:scrollHorizontally="true"
                    android:singleLine="true"
                    android:textColor="@color/btn_bg_color"
                    android:textSize="@dimen/textSizeSmall"
                    android:textStyle="italic" />


            </LinearLayout>
        </ScrollView>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dip"
            android:layout_weight="0.6"
            android:orientation="vertical">

            <com.google.android.material.appbar.AppBarLayout
                android:id="@+id/appBarLayout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@android:color/transparent">

                <com.ogaclejapan.smarttablayout.SmartTabLayout
                    android:id="@+id/myEarningPagerTab"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/buttonHeightNormal"
                    android:layout_below="@+id/spinnerLayout"
                    android:background="@color/btn_bg_color"
                    app:stl_clickable="true"
                    app:stl_defaultTabBackground="?android:attr/selectableItemBackground"
                    app:stl_defaultTabTextAllCaps="true"
                    app:stl_defaultTabTextColor="@drawable/custom_tab_text_color"
                    app:stl_defaultTabTextHorizontalPadding="@dimen/seekbarsize_small"
                    app:stl_defaultTabTextMinWidth="0dp"
                    app:stl_defaultTabTextSize="@dimen/textSizeToSmall"
                    app:stl_distributeEvenly="true"
                    app:stl_dividerColor="#80ffffff"
                    app:stl_dividerThickness="1dp"
                    app:stl_drawDecorationAfterTab="false"
                    app:stl_indicatorAlwaysInCenter="false"
                    app:stl_indicatorColor="#ffffff"
                    app:stl_indicatorCornerRadius="2dp"
                    app:stl_indicatorGravity="bottom"
                    app:stl_indicatorInFront="false"
                    app:stl_indicatorInterpolation="smart"
                    app:stl_indicatorThickness="4dp"
                    app:stl_indicatorWidth="auto"
                    app:stl_indicatorWithoutPadding="false"
                    app:stl_overlineColor="#4D000000"
                    app:stl_overlineThickness="0dp"
                    app:stl_titleOffset="auto_center"
                    app:stl_underlineColor="#4D000000"
                    app:stl_underlineThickness="0dp" />
            </com.google.android.material.appbar.AppBarLayout>


            <androidx.viewpager.widget.ViewPager
                android:id="@+id/myEarningPager"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/myTrainingPagerTab"
                app:layout_behavior="@string/appbar_scrolling_view_behavior" />
        </LinearLayout>


    </LinearLayout>

</LinearLayout>