Buenas, disculpa la molestia pero estoy en el minuto 5:58, creando la Switch, pero me sale este error "constant expression required" justo al crear las case "R.id.btnregistrar". Por que sera este error? Por cierto gracias por tu apoyo y aporte de videos :) me estan ayudando mucho para aprender
El problema del Switch, es que el case no reconoce R, puedes reemplazarlo por if-else, así: public void onClick(View view) { if (view.getId() == R.id.btn_registrar ){ Intent intent = new Intent(context, AdministrarLibroActivity.class); Toast.makeText(context, "Registrar", Toast.LENGTH_SHORT).show(); startActivity(intent); } else if (view.getId() == R.id.btn_buscar) { Intent intent = new Intent(context, BuscarLibroActivity.class); startActivity(intent); Toast.makeText(context, "Buscar", Toast.LENGTH_SHORT).show(); } else if (view.getId() == R.id.btn_listar) { Intent intent = new Intent(context, LibrosActivity.class); startActivity(intent); Toast.makeText(context, "Listar", Toast.LENGTH_SHORT).show(); } }