My activity created through a wizard hash the following code:
@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();
    //noinspection SimplifiableIfStatement
    if (id == R.id.action_settings) {
        return true;
    }
What is this piece of code here?
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
    return true;
}
Without //noinspection SimplifiableIfStatement, the editor warns you because this could be simplified to:
return id == R.id.action_settings;
But that's probably not what you want here, you will need to put something in the if later (e.g. launch a Settings activity).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With