I am having some trouble setting the sub-title in my Toolbar from my fragment. I keep getting a Null Pointer Exception at the setSubTitle.
@Override public
Declare a variable ActionBar toolbar and use it this way:
ActionBar toolbar
toolbar=((AppCompatActivity) getActivity()).getSupportActionBar(); toolbar.setHomeAsUpIndicator(R.drawable.ic_arrow_left); toolbar.setTitle("Detalhes");