First, I want to say that I have modified the method needsDividerBefore and now the divider appeared between menu items. However, I want to customize this divider and I tried all the ways mentioned before but I could not succeed.
Second, the divider I want is as same as foursquare, twitter and instagram used. Is this a common divider or all these applications use a custom layout? I don't know but even if they use custom layouts, I want to add action buttons from menu.xml and how can I customize divider?
Modifying that method will only affect pre-ICS phones so you will still get the natural divider behavior on ICS+. This means that your app will look differently based on what version of Android is running it.
You can change the divider with the actionBarDivider
theme attribute.