For example, inside the
method, you can define a new menu item with an Intent like this:onCreateOptionsMenu()
MenuItem menuItem = menu.add(0, PHOTO_PICKER_ID, 0, "Select Photo");
menuItem.setIntent(new Intent(this, PhotoPicker.class));
这是SDK中的一段话,意思是可以在创建菜单时使用SetIntent来使该项可打开一个Activity.
No comments:
Post a Comment