Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ActionbarSherlock Action Item divider

How can I show a divider in Action Bar item?

I want: | ACTION_1 | ACTION_2

I think that I need to modify the ActionMenuItemView background png but I'm not sure.

Thanks!!

like image 338
ikarius Avatar asked Nov 23 '25 06:11

ikarius


1 Answers

As explained by Jake in this answer, the divider is only shown when one of the following types of ActionButtons are used:

  • Text-only followed by text-only
  • Icon-only followed by text-only
  • Text and icon followed by text-only

If you wish to have it always display, refer to the answer and modify the ActionItemView.java source file within the ActionBarSherlock Library Project. Also see my comment on that answer to retrieve the location of the source file in question.

Other than that, if you would also wish to style that divider, refer to this other great answer.

like image 147
Dr1Ku Avatar answered Nov 24 '25 18:11

Dr1Ku



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!