0
I am making a slider menu and the following error is appearing:
He says that the type of Toolbar I put is wrong, but I have tried to fix and nothing. To make matters worse he does not say a possible solution.
Follow the Activity code:
//variáveis
DrawerLayout drawerLayout;
NavigationView navigationView;
Toolbar toolbar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
getSupportActionBar().hide();
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
/*-----------------Hooks------------------*/
drawerLayout = findViewById(R.id.drawer_layout);
navigationView = findViewById(R.id.nav_view);
toolbar = findViewById(R.id.toolbar);
/*-----------------Toolbar------------------*/
setSupportActionBar(toolbar);
/*-----------------Navigation Drawer Menu------------------*/
//erro na linha abaixo
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawerLayout.addDrawerListener(toggle);
toggle.syncState();
}
private void setSupportActionBar(Toolbar toolbar) {
}