![[Android]ToolBarで左側にできる隙間をなくす方法](https://www.yukiiworks.com/wp-content/uploads/2019/10/android-studio-e1585186990750.jpg)
はじめに
Android開発にてToolBarを使用している際にToolBarにネストした要素の左側になぜか隙間ができてしまった時の対処方法メモです。
解決方法
ToolBarに適用されているThemeの問題でした。
デフォルトでは、ToolBarの要素の中身にContentInsetが設定されているよう。
レイアウトXMLのToolBarに以下の属性を適用することで解決できました。
1 | app:contentInsetStart="0dp" |
使用していたToolBarはandroidx.appcompat.widget.Toolbarです。
以上です。
![[Android][Kotlin]EditTextのキーボードの完了ボタンを検知する方法](https://www.yukiiworks.com/wp-content/uploads/2019/10/android-studio-e1585186990750-300x159.jpg)
![[Laravel]datetime型の項目を年・月・日・日付・時刻で検索する方法](https://www.yukiiworks.com/wp-content/uploads/2019/05/laravel-150x150.png)
![[Docker]different lower_case_table_names settings for server ('1') and data dictionary ('0').エラーでコンテナが起動できない問題について](https://www.yukiiworks.com/wp-content/uploads/2019/08/docker-logo-2-150x150.png)
![[AndroidX対応]Error inflating class android.support.design.widget.BottomNavigationViewエラーについて](https://www.yukiiworks.com/wp-content/uploads/2019/04/android-150x150.jpg)
![[Swift]unrecognized selector sent to instance エラーについて](https://www.yukiiworks.com/wp-content/uploads/2019/04/swift-150x150.png)
![[iOS]Can’t end BackgroundTask: no background task exists with identifier 1 (0x1), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.エラーについて](https://www.yukiiworks.com/wp-content/uploads/2019/09/Xcode-150x150.png)
![[Mac]任意のポートを使用しているプロセスを調べてKillする方法](https://www.yukiiworks.com/wp-content/uploads/2019/03/code1211IMGL1494_TP_V4-150x150.jpg)

