So you have a small content that when zoomed out in a WebView, you want it to be placed at the center of the screen vertically all the time. No CSS or Javascript code can make this work as I learned the hard way.
The solution that worked for me was to set the height of the WebView widget to wrap_content. Then aligning it in the middle vertically.
The only way to have a custom button like the zoom buttons in Android map is to make one of your own. The way I did this is to have an XML drawable assigned to the ImageButton. It is pretty simple.
So you created an overflow menu that contains another sub-menu in Android’s ActionBar. Everything works well after you styled the background color of Widget.AppCompat.PopupMenu.
Once you tried a long click on the overflow MenuItem and proceed to selected a sub MenuItem, you notice the selected background color of the item is not transparent.
The cause for this is because you used android:background. The correct attribute to use is android:colorBackground.