![[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]ランダムな文字列を生成する](https://www.yukiiworks.com/wp-content/uploads/2019/05/laravel-150x150.png)
![[Tips]Slackにて.txtファイルをインライン表示するには](https://www.yukiiworks.com/wp-content/uploads/2019/11/img_ee0070963c090dc28250f1e4e3df3aaf40007-150x150.jpg)
![[Flutter]chopper_generator使用時にbuild_runnerのビルドが完了しない問題の解消法](https://www.yukiiworks.com/wp-content/uploads/2020/08/flutter-150x150.png)
![[Android]Error while executing: am start -n XXX.....エラーについて](https://www.yukiiworks.com/wp-content/uploads/2019/10/android-studio-e1585186990750-150x150.jpg)
![[javascript]ブラウザの戻るボタンで戻ってきた時になんらかの処理をする方法](https://www.yukiiworks.com/wp-content/uploads/2019/05/javascript-150x150.png)
![[Android]paddingしたListViewのスクロールバー位置の変更方法](https://www.yukiiworks.com/wp-content/uploads/2019/04/android-150x150.jpg)
![[iOS13][Process] kill() returned unexpected error 1エラーについて](https://www.yukiiworks.com/wp-content/uploads/2019/09/Xcode-150x150.png)

