向上导航和工具栏标题之间​​的空间太大 [英] Space between Up Navigation and Toolbar title is too large

查看:81
本文介绍了向上导航和工具栏标题之间​​的空间太大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道为什么会这样吗?

Does anyone knows why is it happening?

第一个是它的外观,第二个是我希望它的外观

The first one is how it's look like and the second one is how I want it to look like

OBS:当我在工具栏中启用应用程序图标时,它与标题之间几乎没有空格

OBS: When I enable the app icon in the toolbar, it almost has no space between it and the title

推荐答案

是的,使用v24.0.0及更高版本支持库版本的每个人都会发生这种情况.

Yeah, that happening with everyone using v24.0.0 and above support library version.

自版本24.0.0起,工具栏标题具有额外的16dp填充以匹配材料设计规范.

Toolbar title has an extra 16dp padding since version 24.0.0 to match material design spec.

您需要做的只是将app:contentInsetStartWithNavigation="0dp"设置为工具栏视图.

All you need to do is set app:contentInsetStartWithNavigation="0dp"to toolbar view.

这篇关于向上导航和工具栏标题之间​​的空间太大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆