Does anybody know how to set padding between the ActionBar's home icon and the title?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
I used \t before the title and worked for me.
I used this method
setContentInsetsAbsolute(int contentInsetLeft, int contentInsetRight)
and it works!I adapted Cliffus answer and assigned the logo-drawable in my actionbar style definition, for instance like this in res/style.xml:
The drawable looks like Cliffus' one (here with the default app launcher icon) in res/drawable/actionbar_space_between_icon_and_title.xml:
In the android_manifest.xml you can still set a different app icon (launcher icon on 'desktop'. Any different logo definition here are visible in activities without an action bar.
EDIT: make sure you set this drawable as LOGO, not as your app icon like some of the commenters did.
Just make an XML drawable and put it in the resource folder "drawable" (without any density or other configuration).
The last step is to set this new drawable as logo in your manifest (or on the Actionbar object in your activity)
Good luck!
You can change drawableSize of your DrawerArrow like this:
It isn't correct answer, because you can't choose padding side and DrawerArrow icon scaling when change drawableSize (drawableSize = width = height). But you can margin from left. To margin from right do
I used
AppBarLayout
and customImageButton
do to so.My Java code: