There is an Activity with the following code:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.test); FragmentManager manager = getFragmentManager(); FragmentTransaction ft = manager.beginTransaction(); ft.replace(R.id.leftcontent, new Requests()); ft.commit(); toolbar = (Toolbar) findViewById(R.id.toolbar); if (toolbar != null) { toolbar.bringToFront(); setSupportActionBar(toolbar); } } When loading a new fragment, I tried to disable the toolbar in the following way:
getActivity.getActionBar.hide but the error takes off. Tell me how to do it right?
getActivity().getActionBar().hide()? - pavlofff