Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How I can place overflow menu below toolbar instead of overflow menu to overlaps the app bar

I know that it is per material guideline, but i don't like it and i want it to below toolbar. please provide some info to adjust position of overflow menu.

like image 920
Vishal Makasana Avatar asked Apr 04 '15 10:04

Vishal Makasana


People also ask

Where is the overflow menu button?

The Android overflow menu is accessed from the far right of the actions toolbar at the top of the display of the running app. This menu provides a location for applications to provide additional options to the user.

How do I hide the overflow menu?

"How would I hide this overflow menu icon/button" -- don't put any action items in the action bar. Remove your onCreateOptionsMenu() and onOptionsItemSelected() methods, along with the menu resource(s) that they use. Then, the overflow should never show up.

How do I add icons to overflow?

Alternatively, right-click an empty area of the taskbar and press Taskbar settings. Next, scroll down through the Taskbar settings menu and click the Taskbar corner overflow option. You'll see a list of icons that are present—toggle the slider next to any apps you want to display on the taskbar.

What is the action overflow menu used for?

The action overflow in the action bar provides access to your app's less frequently used actions. The overflow icon only appears on phones that have no menu hardware keys. Phones with menu keys display the action overflow when the user presses the key.


1 Answers

In your main style use <item name="actionOverflowMenuStyle">@style/OverflowMenu</item>, where

<style name="OverflowMenu" parent="Widget.AppCompat.PopupMenu.Overflow">
  <!-- Required for pre-Lollipop. -->
   <item name="overlapAnchor">false</item>
   <item name="android:dropDownVerticalOffset">-4.0dip</item>
  <!-- Required for Lollipop. -->
   <item name="android:overlapAnchor">false</item>
   <item name="android:dropDownVerticalOffset">4.0dip</item>
</style>

For Lollipop style must be in values-v21.

like image 144
Girish Kumar Avatar answered Nov 08 '22 13:11

Girish Kumar