'Imports don't work in android studio (java file)
This 3 imports(in the img) looks like they are in comment and don't work. I tried to clear and rebuild project several times but it doesn't help. I don't know what to do.
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
...
@Override
public boolean onMenuItemClick(Menultem item) {
switch (item.getItemId()) {
case R.id.action_profile:
return true;
case R.id.action_articles:
return true;
case R.id.action_about:
return true;
default:
return false;
}
}
Ow and MenuItem with .getItemId in code tigger errors
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

