<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout
    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:id="@+id/drawerlayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:background="@color/colorPrimary"
            android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
            <TextView
                android:id="@+id/telegram"
                android:layout_width="60dp"
                android:layout_height="25dp"
                android:layout_marginRight="20dp"
                android:background="@drawable/tele"
                android:layout_gravity="end"
                android:layout_marginEnd="20dp" />
        </androidx.appcompat.widget.Toolbar>
        <com.google.android.material.tabs.TabLayout
            android:id="@+id/tab"
            app:tabGravity="fill"
            app:tabMode="fixed"
            app:tabIndicatorHeight="4dp"
            android:layout_below="@id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:tabBackground="@color/colorPrimary"
            android:background="@color/colorPrimary"
            app:tabIndicatorColor="@color/colorWhite"
            android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>
        <androidx.viewpager.widget.ViewPager
            android:id="@+id/viewpager"
            android:layout_below="@id/tab"
            android:layout_above="@id/adView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>
        <com.google.android.gms.ads.AdView
            xmlns:ads="http://schemas.android.com/apk/res-auto"
            android:id="@+id/adView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:layout_alignParentBottom="true"
            ads:adSize="SMART_BANNER"
            ads:adUnitId="@string/bannar_id">
        </com.google.android.gms.ads.AdView>
    </RelativeLayout>
    <LinearLayout
        android:layout_gravity="start"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/colorWhite">
        <include layout="@layout/sidebar"/>
    </LinearLayout>
</androidx.drawerlayout.widget.DrawerLayout>