Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b0b7af0 authored by Bill Napier's avatar Bill Napier
Browse files

Fix up some issues with the onCreateContextMenu example in the Notepad tutorial.

Change-Id: I8e9329d3b9da507effafb886a33a0a7e6574a7c7
parent a29d8394
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -87,8 +87,8 @@ Open the Notepadv2 class.</p>
    menu callback used for the options menu. Here, we add just one line, which will add a menu item
    menu callback used for the options menu. Here, we add just one line, which will add a menu item
    to delete a note. Call <code>menu.add()</code> like so:
    to delete a note. Call <code>menu.add()</code> like so:
      <pre>
      <pre>
public boolean onCreateContextMenu(Menu menu, View v
public void onCreateContextMenu(Menu menu, View v,
        ContextMenuInfo menuInfo) {
        ContextMenu.ContextMenuInfo menuInfo) {
    super.onCreateContextMenu(menu, v, menuInfo);
    super.onCreateContextMenu(menu, v, menuInfo);
    menu.add(0, DELETE_ID, 0, R.string.menu_delete);
    menu.add(0, DELETE_ID, 0, R.string.menu_delete);
}</pre>
}</pre>
+2 −2
Original line number Original line Diff line number Diff line
@@ -87,8 +87,8 @@ Open the Notepadv2 class.</p>
    menu callback used for the options menu. Here, we add just one line, which will add a menu item
    menu callback used for the options menu. Here, we add just one line, which will add a menu item
    to delete a note. Call <code>menu.add()</code> like so:
    to delete a note. Call <code>menu.add()</code> like so:
      <pre>
      <pre>
public boolean onCreateContextMenu(Menu menu, View v
public void onCreateContextMenu(Menu menu, View v,
        ContextMenuInfo menuInfo) {
        ContextMenu.ContextMenuInfo menuInfo) {
    super.onCreateContextMenu(menu, v, menuInfo);
    super.onCreateContextMenu(menu, v, menuInfo);
    menu.add(0, DELETE_ID, 0, R.string.menu_delete);
    menu.add(0, DELETE_ID, 0, R.string.menu_delete);
}</pre>
}</pre>