Android ActionView Of MenuItem Moves To The Left

It seems that whenever I set an ActionView of an ActionBar MenuItem, its alignment moves to the left. Worse, there was a case wherein the 3 dotted icon also moved to the right.

When I decided to use an animation in the refresh icon, only this one moved. The 3 dotted icon stayed put. Good, right?

At least I only had one problem left to solve. So my ActionView XML Layout looks like this:

This should work. Adding a padding to both the left and right should make the ActionView drawable stay put.

Also worth noting is that even if you use the Toolbar class, the same thing happens when you set the animating ActionView. This layout with the correct padding values should fix that.

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *