1
在我style.xml:搜索查看工具欄中有一個paddingBottom來時fitsSystemWindows
<item name="android:windowTranslucentStatus">true</item>
在我toolbar.xml:
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/AppTheme.PopupOverlay">
當我輸入的東西,它看起來像: enter image description here
所以我的問題是: 爲什麼它有一個底部填充?而且,如何使用fitsSystemWindows,但使底部填充爲零?
我的臨時解決方案是: 採用Android:paddingTop = 「XXdp」,而不是機器人:fitsSystemWindows = 「真」
,但它不優雅。
我花了很多時間在谷歌搜索,最終得到中國website.WTF答案 –