首页 > 解决方案 > windowSoftInputMode为adjustPan时如何使ScrollView可滚动?

问题描述

BottomNavigationView在我的活动中使用。当键盘打开并且windowSoftInputMode不是 adjustPanBottomNavigationView显示在键盘上。这就是为什么我设置windowSoftInputModeadjustPan. 但是,现在,我ScrollView的不可滚动。当我更改windowSoftInputMode为 时adjustResizeScrollView工作正常。以下结构是可滚动的,当windowSoftInputMode设置为时adjustResize,但不可滚动,如果adjustPan设置:

   <ScrollView 
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true">
     <android.support.constraint.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

     <!-- Other stuff --> 

  </android.support.constraint.ConstraintLayout>
  </ScrollView>

ScrollView用作根视图。那么,如何解决这个问题呢?

标签: androidscrollviewbottomnavigationview

解决方案


推荐阅读