Android RecyclerView Edittext issue 解决RecyclerView中editext获取焦点紊乱现象

Using this in layout worked : android:descendantFocusability=”beforeDescendants”

<android.support.v7.widget.RecyclerView
        android:id="@+id/recyclerview"
        android:descendantFocusability="beforeDescendants"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_above="@+id/extrasLayout"
        android:layout_below="@+id/anchorView"
        android:layout_marginTop="@dimen/margin5"
        android:fastScrollEnabled="false"
        />

Manifest file : Add this to the activity sectionandroid:windowSoftInputMode=”stateHidden|adjustPan”

<activity
            android:name=".activites.CartActivity"
            android:label="@string/title_activity_cart"
            android:exported="true"
            android:windowSoftInputMode="stateHidden|adjustPan"
            android:parentActivityName=".activites.HomeActivity"
            android:screenOrientation="portrait">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".activites.HomeActivity"/>
        </activity>
    原文作者:twc18638942853
    原文地址: https://blog.csdn.net/twc18638942853/article/details/52415766
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞