任何人都可以建議如何在瀏覽器圖標,電子郵件圖標和聯繫人圖標上點擊應該分別導致android瀏覽器,電子郵件和聯繫人應用程序的圖標列表......現在我已經完成了點擊按鈕。現在我想的圖標(帶圖像和文字),而不是按鈕...我如何在我的android應用程序中有圖標列表;
回答
檢查了這一點:
http://developer.android.com/resources/tutorials/views/hello-formstuff.html#CustomButton
這將顯示你必須把你想要的圖像RES /繪製/和然後在應用程序中將它們加載爲按鈕。
我以爲你想要ImageButton
,點擊你想打開特定的應用程序/瀏覽器/聯繫人列表。
的ImageButton - 顯示一個按鈕的圖像(而不是文字),可以由用戶按下或點擊
<ImageButton
android:id="@+id/ImageButton01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon/>
如果你想要的ImageButton與背景按鈕,然後設置android:background
屬性,如下:
<ImageButton
android:id="@+id/ImageButton01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon"
android:background="@drawable/background_image"/>
沒有小部件圖標。 你可以使用LinearLayout
和ImageView
和TextView
自己做。
的XML應該是這樣的:
<LinearLayout android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/your_image"/>
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/your_icon_text"/>
</LinearLayout>
嗨,謝謝..我想要圖像視圖大小相似的圖標和模擬器屏幕的角落... – manju 2010-11-15 11:27:33
如果你所需要的工作想要在您的按鈕中使用和文字,我這樣做的方式是創建一個9補丁,因此我可以使用填充和可伸縮區域定義文本的位置。然後遵循與已經提到的自定義按鈕相同的說明,但使用標準按鈕而不是圖像按鈕。
嗨,感謝TenFour你可以給代碼或任何參考網站9補丁.... – manju 2010-11-16 04:38:59
- 1. 我如何在我的android應用程序中有圖標列表;
- 2. 我的Android應用程序在我的Android應用程序
- 3. 我的android應用程序沒有顯示在應用程序的主要列表中。我必須做什麼?
- 4. 如何在我的iPhone應用程序中包含512X512圖標?
- 5. 如何在Android Market應用程序中顯示我的Android應用程序列表
- 6. 我如何能在Android應用程序
- 7. 我想在我的Android應用程序相應調整該圖標在頂欄
- 8. 如何在Android中設置我的操作欄應用程序圖標onClickListner?
- 9. 如何在我的Android應用程序中啓動android應用程序?
- 10. 如何在我的應用程序中搜索配方列表
- 11. 如何在我的應用程序中的Android應用
- 12. 我如何獲得所有安裝的應用程序列表?
- 13. 在我的應用程序中的Android
- 14. 在我的應用程序中的Android
- 15. 在我的應用程序中的android
- 16. 在我們的應用程序在Android搜索列表?
- 17. 我如何在我的應用程序中獲得android垂直網格視圖?
- 18. 如何在不同應用程序列表中的一個特定應用程序中打開我的圖像?
- 19. 如何將圖標添加到我的應用程序中?
- 20. 在我的Android應用程序中使用Maps應用程序
- 21. 如何在我的視頻應用程序中創建一個列表視圖?
- 22. 我想在我的應用程序中繪製圖表
- 23. 如何獲得Android應用程序的應用程序列表?
- 24. 我如何在位置服務列表中獲取我的應用程序?
- 25. 如何在android中將android地圖應用程序集成到我的應用程序中?
- 26. Android的Gmail應用程序,如列表視圖與圖標中的字母
- 27. 如何將Google Play搜索圖標添加到我的Android應用程序中?
- 28. 我想在我的Android應用程序的Android中
- 29. 在我的Android應用程序中打開vimeo應用程序?
- 30. 當我向列表視圖添加圖標時,我的Android應用程序停止
它工作的感謝... – manju 2010-11-17 12:24:03