티스토리 뷰




app:contentInsetStart="0dp"

toolbar xml에서 위에 한줄 넣어주면됨... 아래것 안해도됨.


경로 : android-support-v7-appcompat 프로젝트

android-support-v7-appcompat/values/styles_base.xml



변경전

<style name="Base.Widget.AppCompat.Toolbar" parent="android:Widget">

        <item name="titleTextAppearance">@style/TextAppearance.Widget.AppCompat.Toolbar.Title</item>

        <item name="subtitleTextAppearance">@style/TextAppearance.Widget.AppCompat.Toolbar.Subtitle</item>

        <item name="android:minHeight">?attr/actionBarSize</item>

        <item name="titleMargins">4dp</item>

        <item name="maxButtonHeight">56dp</item>

        <item name="collapseIcon">?attr/homeAsUpIndicator</item>

        <item name="collapseContentDescription">@string/abc_toolbar_collapse_description</item>

        <item name="contentInsetStart">16dp</item>

    </style>


변경후

<style name="Base.Widget.AppCompat.Toolbar" parent="android:Widget">

        <item name="titleTextAppearance">@style/TextAppearance.Widget.AppCompat.Toolbar.Title</item>

        <item name="subtitleTextAppearance">@style/TextAppearance.Widget.AppCompat.Toolbar.Subtitle</item>

        <item name="android:minHeight">?attr/actionBarSize</item>

        <item name="titleMargins">4dp</item>

        <item name="maxButtonHeight">56dp</item>

        <item name="collapseIcon">?attr/homeAsUpIndicator</item>

        <item name="collapseContentDescription">@string/abc_toolbar_collapse_description</item>

        <item name="contentInsetStart">0dp</item>

    </style>


참고1 : http://stackoverflow.com/questions/26455027/android-api-21-toolbar-padding

참고2 : http://stackoverflow.com/questions/26433409/android-lollipop-appcompat-actionbar-custom-view-doesnt-take-up-whole-screen-w

댓글
댓글쓰기 폼
공지사항
Total
741,539
Today
136
Yesterday
151
«   2019/08   »
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
글 보관함