2017-04-02 8 views
1

: 내 toolbar.xml에서searchView는 paddingBottom이있는 경우 fitsSystemWindows 내 style.xml에서

<item name="android:windowTranslucentStatus">true</item> 

: enter image description here

:

<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를 사용하지만 bottom padding을 0으로 만드는 법?

내 임시 솔루션입니다 : 사용 안드로이드 : paddingTop = "XXdp"대신 안드로이드의 :

fitsSystemWindows = "true"로하지만 우아하지.

답변

0

나는 Baidu를 검색하여 완벽한 해결책을 찾았습니다.

http://www.th7.cn/Program/Android/201603/780326.shtml

바로이

android:windowSoftInputMode="adjustPan" 
+0

을 manifast에 추가 그것은 나에게 구글에서 검색 많은 시간을 요하고 마지막으로 중국어 website.WTF의 답변을 얻을 –