I did not understand your question very well but if you do not know how to use a ToolBar, there's a little help:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater ().inflate ( R.menu.menu_toolbar, menu );
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId ();
//noinspection SimplifiableIfStatement
if (id == R.id.Cerrar) {
fondo= new Fondo ();
getSupportFragmentManager ().beginTransaction ().add ( R.id.content_main, fondo ).commit ();
return true;
}
if(id==R.id.Scan){
Intent intent = new Intent (getBaseContext (), Scanner.class);
startActivity(intent);
}
return super.onOptionsItemSelected ( item );
}
// </editor-fold>
Data:
Remember that the current android brings you help, so it's easier to do it, otherwise the tutorials are very helpful:)