3
A
回答
6
它相當簡單與Toolbar Widget
做你可以按照下面的例子來實現這一目標:
首先創建一個Oval shape
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#ff00"/>
</shape>
然後創建如下一個toolbar
部件:
<android.support.v7.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
android:background="?colorPrimary">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<ImageView
android:id="@+id/openMenu"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/ic_menu"/>
<TextView
android:id="@+id/badger"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="end|right|top"
android:layout_marginTop="10dp"
android:background="@drawable/badge"
android:gravity="center"
android:text="1"
android:textColor="@color/white"/>
</FrameLayout>
</android.support.v7.widget.Toolbar>
+0
我最終刪除了現有的菜單圖標,並使用上述佈局設置了徽章。謝謝 – FlashAsh99
+0
@ k0sh你可否詳細說明一下。我已經嘗試過你的代碼,並且最後只有兩個漢堡包圖標: -/ –
+0
@ ban-geoengineering如果使用上述代碼,請刪除編程設置的漢堡包圖標。 – k0sh
相關問題
- 1. 保持漢堡菜單內嵌徽標
- 2. 頁漢堡包菜單上單擊
- 3. 漢堡包菜單的3行圖標未出現
- 4. Bootsrap漢堡包菜單Jquery
- 5. 如何修復漢堡包菜單
- 6. 如何將漢堡包菜單圖標移動到右側?
- 7. 漢堡菜單css光標
- 8. 漢堡包菜單與徽標圖像相同的頂部導航欄
- 9. 自定義圖標 - 漢堡菜單
- 10. 的Android Navigationdrawer切換漢堡包圖標
- 11. 漢堡菜單+ paralax
- 12. 如何在點擊時更改漢堡菜單圖標?
- 13. 如何在導航菜單中垂直居中漢堡圖標?
- 14. jQuery - 添加漢堡包手機菜單圖標
- 15. 更改菜單項和漢堡包圖標的顏色
- 16. 如何實現移動設計漢堡的側面菜單與着名?
- 17. Bootstrap漢堡包菜單自定義
- 18. 漢堡包菜單點擊關閉
- 19. Bootstrap漢堡包菜單不起作用
- 20. 自助漢堡包菜單問題
- 21. 沒有出現漢堡菜單
- 22. Android漢堡菜單和後退箭頭
- 23. 如何創建下拉漢堡菜單
- 24. 引導 - 定製漢堡菜單,圖像圖標在CSS
- 25. 標題菜單沒有出現在我的漢堡html頁面
- 26. 如何在基金會中對齊漢堡包菜單
- 27. 如何在AMP HTML中創建響應漢堡包菜單
- 28. 如何在bootstrap中使用多漢堡包菜單
- 29. 隱藏漢堡菜單
- 30. 點擊漢堡菜單
ya在菜單圖標圖像上方設置textview並設置圓形背景 – Destro
您是否可以將漢堡包菜單圖標嵌入爲主題的一部分,從而可以精心製作菜單圖標?那麼你如何改變它? – FlashAsh99
這與在漢堡包菜單圖標上專門添加徽章並不重複。不是其他菜單圖標 – FlashAsh99