2011-02-26 23 views

回答

10

是的,這是可能的。看看這個頁面:http://androiddrawableexplorer.appspot.com/瞭解所有可用圖標的列表。頂部有一個用法示例,但如果您在menu.xml文件中執行此操作,請使用如下代碼:

<item android:id="@+id/end" 
    android:title="@string/end_label" 
    android:alphabeticShortcut="@string/end_shortcut" 
    android:icon = "@android:drawable/ic_menu_close_clear_cancel" /> 
+0

乾杯。實際上看起來沒有什麼適合的地方(廢紙簍太大,X太紅了),所以我不得不畫出自己的,或者只是使用文字:-( – FrinkTheBrave 2011-02-26 17:33:17

+0

樂嘆。你鏈接的網站似乎是404截至2016年3月。但請參閱http://androiddrawables.com/。 – 2016-03-18 16:19:22

5

FrinkTheBrave,

您可以通過XML編程android.R.drawable.<drawable here>android:[email protected]:drawable/<drawable here>訪問許多系統可繪製的。 This site包含可繪製的完整列表,但其中一些是私有的,因此用戶無法使用。如果您使用的是Eclipse,則當您鍵入android.R.drawable時,intellisense應該拉出可用繪圖的列表。

相關問題