且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何添加图标,玻璃的选择菜单项?

更新时间:2023-12-04 10:09:28

您可以这样做同样的方式,你会在Android上,在你的菜单项的 Android的指定资源:图标属性。例如,

You can do this the same way that you would on Android, by specifying a resource in your menu item's android:icon attribute. For example,

<item android:id="@+id/foo" android:icon="@drawable/my_icon" />

将查找一个名为图标 RES /绘 - * / my_icon.png

要匹配推荐玻璃UX /设计指南,你的图标应该是白色的透明背景和50倍; 50像素。

To match the recommended Glass UX/design guidelines, your icon should be white with a transparent background and 50 × 50 pixels.