Coordinatorlayout adjustresize not working

前端 未结 9 549
傲寒
傲寒 2020-12-08 15:32

MY CODE (and more): I have a Coordinator Layout as follows



        
相关标签:
9条回答
  • 2020-12-08 15:56

    Hi I had the same problem and I only put

            android:windowSoftInputMode="adjustPan"
    

    in yout manifest for the activity concerned and the keyboard moves up the view accordingly now

    0 讨论(0)
  • 2020-12-08 15:57

    For now I am solving it using androidx.drawerlayout.widget.DrawerLayout to wrap:

    CoordinatorLayout, AppBarLayout, CollapsingToolbarLayout, Toolbar, NestedScrollView

    It is maybe not the best idea but it is working for me ;)

    I have a sample in my project: https://github.com/maiconpintoabreu/Kupping-Mobile/blob/master/app/src/main/res/layout/activity_event_new.xml

    0 讨论(0)
  • 2020-12-08 16:00

    Try this


    your_layout.xml

    <RelativeLayout
        android:fitsSystemWindows="true" > <!-- Crucial! -->
    
        <android.support.design.widget.CoordinatorLayout>
            ...
            <android.support.v7.widget.RecyclerView />
            ...
        </android.support.design.widget.CoordinatorLayout>
    
    </RelativeLayout>
    

    AndroidManifest.xml

    <activity
        android:name=".YourActivity"
        android:windowSoftInputMode="adjustResize"> <!-- Crucial! -->
    </activity>
    
    0 讨论(0)
提交回复
热议问题