Android Toolbar actionLayout of Switch causes text to jump when menu is pressed

前端 未结 2 1308
鱼传尺愫
鱼传尺愫 2021-01-06 13:35

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 simp

2条回答
  •  情书的邮戳
    2021-01-06 13:57

    I was following your code to add Switch to my action bar and I was able to solve your problem with the "jumping text" by setting the width of the Switch to wrap_content like this:

    
    

提交回复
热议问题