I have the following code.
private void TabsCadastro(int visualizar,int origem)
{
TabSpec abaCLiente,abaEndereco,abaContrato;
TabHost tabHost = getTabHost();
abaCLiente = tabHost.newTabSpec("tag1");
abaCLiente.setContent(R.id.clientes);
abaCLiente.setIndicator("Cliente");
abaEndereco = tabHost.newTabSpec("tag2");
abaEndereco.setContent(R.id.endereco);
abaEndereco.setIndicator("Endereço");
abaContrato = tabHost.newTabSpec("tag3");
abaContrato.setContent(R.id.contrato);
abaContrato.setIndicator("Contrato");
tabHost.setFocusableInTouchMode(true);
if(origem == 0)
{
tabHost.addTab(abaCLiente);
tabHost.addTab(abaEndereco);
tabHost.addTab(abaContrato);
}
tabHost.getTabWidget().setEnabled(false);
tabHost.setCurrentTab(0);
}
Would you like to know how to change the focus of the tabs? I would like to create a button to change the focus instead of clicking the tabs for this. I will put a button on each tab to navigate between them already tried to use
setFocused(boolean),
setFocusable(boolean),
But I could not change the focus.