if you're asking, how do a create a menu with images, you might try
something like this:
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
menu.add(0, 1, 0, "Help!")
.setIcon(com.android.superdoodad.R.drawable.icon); // .. or
whatever you want the menu icon to be
menu.add(0, 2, 0, "Settings")
.setIcon(com.android.superdoodad.R.drawable.icon); // get rid
of this line if you dont want an icon
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case 1:
doSomething(); // or whatever you want the menu
action to be
return true;
case 2:
doSomethingElse"1");
return true;
}
return super.onOptionsItemSelected(item);
}
.. however, if what you're actually asking is, how do i make or use an
image, just make an image however you usually do so, save or export it
as a .png file, and put it in your project's res/drawable folder.
-br
On Dec 5, 12:09 pm, Noonien Soong <[EMAIL PROTECTED]> wrote:
> Hi,
>
> does anyone know what's the easiest way to create new menu icons for
> the gray menu that pops up when you press the menu button ? I want to
> create custom icons with the same consistent look.
>
> I mean the icons that can be found in the SDK and are all named
> "ic_menu_*.png".
>
> Is there some sort of a vector graphics template available ?
>
> Would be great to get that...
>
> Thx!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---