Derek D
Derek D

Reputation: 119

Navigation Drawer Notification Icon without Actionbar

In my application I do not want to use the actionbar or toolbar as my app is fairly simplistic and having one of those two would clutter my application. I know when using an actionbar with a navigation drawer there is an icon on the top left to show the drawer exists; however, I want a small notification icon in the middle of the screen to show that the drawer exists. Perhaps a clear arrow? Is this possible? I can not find any documentation on how I would approach doing this. Thank you.

Edit: I do not want to use ANY type of action bar

Upvotes: 0

Views: 655

Answers (2)

orrett3
orrett3

Reputation: 1038

Update 2 You can wrap your indicator in a 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>

Update

Use FloatingActionButton from design library.


If you use a toolbar you can set a custom icon. Here is another post doing something like that: Custom icon in Android toolbar

Upvotes: 1

Azim Ansari
Azim Ansari

Reputation: 1378

You can use custom action bar in your app that can be customized according to your need.

Refer this link Custom Action Bar

Upvotes: 0

Related Questions