Android: Custom action bar,How to use entire width?

前端 未结 5 906
梦如初夏
梦如初夏 2020-12-10 04:54

Here is an image of my custom action bar:

\"enter

I want to use the entire wid

5条回答
  •  感情败类
    2020-12-10 05:35

    I just wanted to tell everybody that IN SOME WAY having this code below does not work. A space between the edge of the screen and the Toolbar remains in my case.

    app:contentInsetEnd="0dp"
    app:contentInsetStart="0dp"
    

    I spent ~2hours doing some manipulations with styles and this two attributes. Nothing helped me. All of a sudden I thought whether this "space" may be just a padding or margin of the Toolbar. But my Toolbar hadn't had any padding or margin. And I added 0dp padding to the Toolbar in my layout .xml file.

    android:padding="0dp"
    

    It worked. You can imagine my face. This space has gone away. Android lied to me.

提交回复
热议问题