0
Hello. I have created two tabs in my application. Open Request and Closed Orders. But in this Activity Toolbar does not take.
Code:
public class PedidoActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pedido);
TabHost tabHost=(TabHost)findViewById(R.id.tabHost);
tabHost.setup();
TabSpec spec1=tabHost.newTabSpec("EM ABERTO");
spec1.setContent(R.id.tab1);
spec1.setIndicator("EM ABERTO" ,getResources().getDrawable(R.drawable.ic_menu_camera));
TabSpec spec2=tabHost.newTabSpec("FECHADO");
spec2.setIndicator("FECHADO" ,getResources().getDrawable(R.drawable.ic_menu_camera));
spec2.setContent(R.id.tab2);
tabHost.addTab(spec1);
tabHost.addTab(spec2);
}
On this screen does not look like other, example:
I would like to add a Toolbar on this screen as well. For in this Toolbar I want to add the back button.
Post her xml code.
– Bruno Romualdo