<!--
    Created by Angel Leon (@gubatron), Alden Torres (aldenml),
 *            Marcelina Knitter (@marcelinkaaa)
    Copyright (c) 2011-2026, FrostWire(R). All rights reserved.

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
-->

<org.team_hermes.wireshare.android.gui.views.SafeDrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/activity_main_drawer_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:clickable="true"
        android:focusable="true">

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

            <include layout="@layout/toolbar_main" />

            <FrameLayout
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_weight="1">

                <fragment
                        android:id="@+id/activity_main_fragment_search"
                        android:name="org.team_hermes.wireshare.android.gui.fragments.SearchFragment"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:tag="search_fragment" />

                <fragment
                        android:id="@+id/activity_main_fragment_transfers"
                        android:name="org.team_hermes.wireshare.android.gui.fragments.TransfersFragment"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:tag="transfers_fragment" />
            </FrameLayout>

            <org.team_hermes.wireshare.android.gui.views.MiniPlayerView
                    android:id="@+id/activity_main_player_notifier"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:visibility="gone" />
        </LinearLayout>

        <com.google.android.material.navigation.NavigationView
                android:id="@+id/activity_main_nav_view"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_gravity="start"
                android:fitsSystemWindows="true"
                app:headerLayout="@layout/nav_view_header"
                app:itemBackground="@drawable/nav_view_background_color_selector"
                app:itemIconTint="@color/nav_view_icon_color_selector"
                app:itemTextColor="@color/app_text_primary"
                app:menu="@menu/nav_view_menu">

            <org.team_hermes.wireshare.android.gui.views.AdMenuItemView
                    android:id="@+id/slidermenu_ad_menuitem"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="bottom"
                    android:visibility="gone" />
        </com.google.android.material.navigation.NavigationView>
</org.team_hermes.wireshare.android.gui.views.SafeDrawerLayout>
