I have a problem with my advance menu, it does not work when I click the first time, it is necessary to double click to perform the action
bottomNavigationView.setOnNavigationItemReselectedListener(new BottomNavigationView.OnNavigationItemReselectedListener() {
@Override
public void onNavigationItemReselected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.menuAvancar:
if (camposObrigatoriosWS()) {
DatabaseHelper db = new DatabaseHelper(getApplicationContext());
ClienteDao clienteDao = new ClienteDao();
clienteDao.buscarUltimoID(db);
//Verifica se quer continuar cadasto de pacote ou somente cliente
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(CadastrarClienteActivity.this);
LayoutInflater inflater = getLayoutInflater();
View dialogView = inflater.inflate(R.layout.item_dialog_cadastro_cliente, null);
dialogBuilder.setView(dialogView);
iniciarComponentesDialog(dialogView);
dialogBuilder.create().show();
btnContinuar.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
inserirCliente("N");
Intent intent = new Intent(CadastrarClienteActivity.this, EscolherPacoteActivity.class);
startActivity(intent);
}
});
btnCadastrar.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
inserirCliente("S");
Intent intent = new Intent(CadastrarClienteActivity.this, CaixaDeEntradaActivity.class);
startActivity(intent);
}
});
} else {
toastUtil.exibirToastCurtoPrazo(CadastrarClienteActivity.this, "Campos obrigatorios não informado");
}
break;