public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.action_create_order:
// Kod wykonywany po kliknięciu elementu Złóż zamówienie
Intent intent = new Intent(this, OrderActivity.class);
startActivity(intent);
return true;
default:
return super.onOptionsItemSelected(item);
}
}
¨
Prosty pasek aplikacji
¨
Pasek narzędzi
¨
Akcja
¨
Przycisk W górę
¨
Akcja udostępniania
Pełny kod plik MainActivity.java
Poniżej przedstawiliśmy pełną zawartość pliku MainActivity.java. Zaktualizuj swoją
wersję tego pliku, tak by była identyczna z naszą. Wszystkie ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.