27 March 2018
Ссылка
click to show
click to show
http://trucosandroidstudio.blogspot.com.es/2015/03/como-cambiar-nuestro-api-level-de.html si te pierdes te vas aqui
Raulpara saber si has elegido un elemento del menu usas esto
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
CharSequence text = null;
switch (id){
case R.id.encontrar:
break;
case R.id.buscar:
//aqui pones todo lo que quieres que haga el "item de buscar
break;
}
return super.onOptionsItemSelected(item);
}
Raulporqie?
Esta corriendo 8 en binario dos posiciones hacia la derecha 8 en binario es 1000
Si quitas 2 ceros, queda 10
que serían 2 en decimal
[Respondiendo a 🇷 🇦 🇺 17]
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
CharSequence text = null;
switch (id){
case R.id.encontrar:
break;
case R.id.buscar:
Intent intent = new Intent(MainActivity.this,Main2Activity.class);
startActivity(intent);
break;
}
return super.onOptionsItemSelected(item);
}