当windowSoftInputMode为AdjustPan时,如何使ScrollView可滚动?

时间:2018-07-13 12:08:49

标签: android scrollview bottomnavigationview

我在活动中使用BottomNavigationView。当键盘打开且windowSoftInputMode adjustPan时,键盘上会显示BottomNavigationView。这就是为什么我将windowSoftInputMode设置为adjustPan的原因。但是,现在,我的ScrollView无法滚动。当我将windowSoftInputMode更改为adjustResize时,ScrollView工作正常。当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用作根视图。那么,如何解决这个问题呢?

0 个答案:

没有答案