Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

layout focus from recycleview not from top in fragment inside nestedScrollview in android xml

<android.support.v4.widget.NestedScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:focusableInTouchMode="true"
        android:orientation="vertical">

        <View
            android:id="@+id/someView"
            android:layout_width="wrap_content"
            android:layout_height="350dp"/>

        <android.support.v7.widget.RecyclerView
            android:id="@+id/recyclerView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"/>

    </LinearLayout>
</android.support.v4.widget.NestedScrollView>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #layout #focus #recycleview #top #fragment #nestedScrollview #android #xml
ADD COMMENT
Topic
Name
4+9 =