I created drawer menu: drawer menu. As you can see, I managed to show the drawer perfectly, but when I include the activity_main.xml it doesn't get the data (variables & placeholder)
my main_activity.xml: how it looks, TextView should be numbers and placeholder not getting any data so... drawer_layout.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:openDrawer="end"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<include
layout="@layout/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/main_container"
/>
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/drawer_menu" />
</android.support.v4.widget.DrawerLayout>
I need to show the data and still use the drawer... Is it possible? And if you need more information, just ask, I will provide
EDIT: I need to pass the information from MainActivity.class (connected to activity_main.xml) to Drawer_layout.class? (connected to drawer_layout.xml)