Android Toolbar actionLayout of Switch causes text to jump when menu is pressed
问题 Please refer to my project at: https://github.com/paulpv/ToolbarSwitch I am working on a simple custom layout for the Android Toolbar (aka: new ActionBar). This simple control adds a Switch to the Toolbar, and can be seen here highlighted in magenta: My problem is that immediately when the overflow menu is pressed, the Switch's Text jumps to the top of the Toolbar, and remains that way when you close the overflow menu: A similar thing happens in Landscape orientation (the subtle difference