I have 3 Tab Bars that are at the bottom of the layout and the action bar at the top, by default. I need to know how to modify the title of my Action Bar every time a different Tab Bar is selected. Thankful.
I have 3 Tab Bars that are at the bottom of the layout and the action bar at the top, by default. I need to know how to modify the title of my Action Bar every time a different Tab Bar is selected. Thankful.
You need to do SetTitle () on ActionBar every time you change Activity. You can use the direct title of Activity
getActionBar().setTitle(MainActivity.class.getSimpleName());
Or you can put a custom title directly from the Strings file.
getActionBar().setTitle(this.getResources().getString(R.string.sua_string));
Use this whenever an Activity is started.
Actionbar actionbar = getActionbar();
//Ou
Actionbar actionbar = getSupportActionBar();
actionbar.setTitle("Digite ou chame seu titulo aqui");