So, I followed the Slidnerd tutorial in the navigation box . The problem occurs when I try to create an instance of ActionBarDrawerToggle to indicate Activity , DrawerLayout and Toolbar .
(NavigationDrawerFragment)getSupportFragmentManager().findFragmentById(R.id.fragment_nav_drawer); drawerFragment.setUp((DrawerLayout) findViewById (R.id.drawer_layout, toolbar);
I get the underlying error (R.id.drawer_layout toolbar, ). The error says: "findViewById (int) in Activity cannot be applied to (int, android.support.v7.widget.Toolbar" .
I tried the proposed solution, which was supposed to import the android.support.v4.app.Fragment file, but even after trying this, the problem still persists, I even tried the other way around. I also want to publish my relevant code if necessary.
Does anyone know how to fix this?
All help is appreciated. Thanks and had a good day!
source share