首先将theme改为继承NoActionBar类型,用自己的布局来实现titleBar,如:<style name="Theme.Test" parent="Theme.MaterialComponents.Light.NoActionBar.Bridge&quo