![](/img/trans.png)
[英]Emulate Navigation Drawer Icon on Android ActionBar without Navigation Drawer
[英]Navigation Drawer Notification Icon without Actionbar
在我的應用程序中,我不想使用actionbar
toolbar
或toolbar
因為我的應用程序非常簡單,並且擁有這兩個功能之一會使我的應用程序混亂。 我知道在將actionbar
與navigation drawer
一起使用時,在actionbar
有一個圖標,表明該抽屜存在。 但是,我希望屏幕中間有一個小的通知圖標,以顯示抽屜已存在。 也許是清晰的箭頭? 這可能嗎? 我找不到任何有關如何執行此操作的文檔。 謝謝。
編輯:我不想使用任何類型的操作欄
更新2您可以將指標包裝在RelativeLayout
。
<RelativeLayout android:layout_width="match_parent"
android:layout_width="match_parent"/>
<MyIndicator
android:id="@+id/indicator"
android:layout_width="match_parent"
android:layout_width="match_parent"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"/>
<OtherView android:layout_width="match_parent"
android:layout_width="match_parent"/>
</RelativeLayout>
更新資料
使用設計庫中的FloatingActionButton
。
如果使用工具欄,則可以設置自定義圖標。 這是另一篇類似的文章: Android工具欄中的“自定義”圖標
您可以在應用程序中使用可根據需要進行自定義的自定義操作欄。
參考此鏈接自定義操作欄
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.