NestedScrollview not working inside a linearlayout which has child as relative layout and nested scrollview having child as recycler viewLinearLayout not expanding inside a ScrollViewGet all child views inside LinearLayout at onceHow do I play an audio file in Android?RecyclerView inside ScrollView is not workingRecycler view inside NestedScrollView causes scroll to start in the middleRecycler View inside a NestedScrollViewRecyclerview inside Nested Scrollview scroll but does not fast scroll like normal Recyclerview or Nested ScrollviewRecycle View not working inside ScrollView/NestedScrollViewRecycler view is not showing in Nested scrollviewRecycler view scroll issue inside nested scrollview

Is the "cosmological constant tension" the prime reason that we believe the expansion of the universe is accelerating?

What does ものと見て, mean?

Send single HTML mail

kids pooling money for Lego League and taxes

What does Kasparov mean by "I was behind in three and even in one after six games"?

Trapped in an ocean Temple in Minecraft?

Why is a dedicated QA team member necessary?

Strange Cron Job takes up 100% of CPU Ubuntu 18 LTS Server

The seven story archetypes. Are they truly all of them?

Inadvertently nuked my disk permission structure - why?

USA: Can a witness take the 5th to avoid perjury?

Why is autologous blood transfusion banned as a kind of doping?

401(k) investment after being fired. Do I own it?

Why can't my huge trees be chopped down?

What do I do when a student working in my lab "ghosts" me?

How to judge a Ph.D. applicant that arrives "out of thin air"

Other than a swing wing, what types of variable geometry have flown?

How do I run a game when my PCs have different approaches to combat?

How can I receive packages while in France?

Why was Sauron not trying to find the Ring, and instead of preparing for war?

What is the lowest speed of a bogey a jet fighter can intercept/escort?

Anagramming in sixes

Creating Darkness

Airplanes in static display at Whiteman AFB



NestedScrollview not working inside a linearlayout which has child as relative layout and nested scrollview having child as recycler view


LinearLayout not expanding inside a ScrollViewGet all child views inside LinearLayout at onceHow do I play an audio file in Android?RecyclerView inside ScrollView is not workingRecycler view inside NestedScrollView causes scroll to start in the middleRecycler View inside a NestedScrollViewRecyclerview inside Nested Scrollview scroll but does not fast scroll like normal Recyclerview or Nested ScrollviewRecycle View not working inside ScrollView/NestedScrollViewRecycler view is not showing in Nested scrollviewRecycler view scroll issue inside nested scrollview






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















NestedScrollview is not showing up inside Linearlayout having child as relative layout and NestedScrollview with child as recycler view.



I have tried solution as recyclerview.setnestedscrollingenabled(false) after setting adapter and recyclerview.sethasfixedsize(true) but none is working.



<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="vertical">

<RelativeLayout
android:id="@+id/restaurant_list_header"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<ImageView
android:id="@+id/img_cusine_1"
android:layout_width="fill_parent"
android:layout_height="150dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_marginLeft="0dp"
android:layout_marginTop="2dp"
android:layout_marginRight="0dp"
android:scaleType="fitXY"
android:src="@drawable/food_1" />

<ImageView
android:id="@+id/arrow_white"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignBottom="@id/img_cusine_1"
android:layout_marginLeft="20dp"
android:layout_marginBottom="30dp"
android:src="@drawable/white_arrow" />

<TextView
android:id="@+id/detail_restaurant_name"
android:layout_width="183dp"

android:layout_height="27dp"
android:layout_alignTop="@+id/arrow_white"
android:layout_alignBottom="@id/img_cusine_1"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"

android:layout_marginStart="20dp"
android:layout_marginLeft="31dp"
android:layout_marginTop="-2dp"
android:layout_marginEnd="125dp"
android:layout_marginRight="125dp"
android:layout_marginBottom="30dp"
android:layout_toEndOf="@+id/arrow_white"
android:layout_toRightOf="@+id/arrow_white"
android:text="Restaurant Name"
android:textColor="@color/white"
android:textStyle="bold" />
</RelativeLayout>

<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"

>

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

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<TextView
android:id="@+id/detail_restaurant_name_sub"
style="@style/RestuarantNames"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:text="Restuarant Name" />

<TextView
android:id="@+id/detail_restaurant_ratings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:background="@color/textGreen"
android:text="3.6"
android:textColor="@color/white"
tools:ignore="RtlHardcoded" />
</RelativeLayout>

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

<TextView
style="@style/UserLocation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@string/detail_retaurant_list_ratings_header" />

<ImageView
android:layout_width="250dp"
android:layout_height="30dp"
android:layout_marginTop="2dp"
android:src="@drawable/rating" />
</LinearLayout>

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="5dp"
android:background="@android:color/darker_gray" />

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

<TextView
style="@style/UserLocation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@string/detail_retaurant_list_delivery_place_header" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal">

<ImageView
android:id="@+id/green_arrow"
android:layout_width="25dp"
android:layout_height="25dp"
android:contentDescription="User Location"
android:src="@drawable/icon_user_location"
tools:ignore="HardcodedText" />

<TextView
android:id="@+id/user_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginLeft="15dp"
android:layout_marginTop="3dp"
android:layout_marginEnd="146dp"
android:layout_marginRight="146dp"
android:layout_marginBottom="-6dp"
android:text="Rajouri Garden"
android:textStyle="bold"
tools:ignore="HardcodedText" />

<!--<TextView
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/user_address_change"
android:text="@string/user_change"
android:layout_marginRight="10dp"
style="@style/User_Green_Font" />-->
</LinearLayout>

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="5dp"
android:background="@android:color/darker_gray" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="Delivery in 33 minutes.Live tracking available"
android:textColor="#FF7F50"
android:textStyle="bold" />

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="5dp"
android:background="@android:color/darker_gray" />

<Switch
android:id="@+id/vegSwitch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@string/dish_type_veg"
android:textColor="@color/grey"
android:textStyle="bold" />

<TextView
style="@style/HeaderRestuarantsRecommendations"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dish_type_best_sellers" />

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">

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

/>

</android.support.v4.widget.SwipeRefreshLayout>

<com.andremion.counterfab.CounterFab
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom|end"
android:src="@drawable/ic_shopping_cart_black_24dp"
app:backgroundTint="#3CB371"
tools:ignore="VectorDrawableCompat" />

</RelativeLayout>
</LinearLayout>

</LinearLayout>
</android.support.v4.widget.NestedScrollView>

</LinearLayout>


Expected result:Need to scroll all elements inside nestedscrollview under Relative layout which has big image.
Actual:Not able to see nested scrollview ,tried using recyclerview.setnestedscrollingenabled(false) to hide scrolling behaviour of recycler view as well as recyclerview.sethasfixedsize(true) but nothing worked.
If i dont set above two properties i can see scrolling of recycler view.










share|improve this question






























    0















    NestedScrollview is not showing up inside Linearlayout having child as relative layout and NestedScrollview with child as recycler view.



    I have tried solution as recyclerview.setnestedscrollingenabled(false) after setting adapter and recyclerview.sethasfixedsize(true) but none is working.



    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_margin="10dp"
    android:orientation="vertical">

    <RelativeLayout
    android:id="@+id/restaurant_list_header"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">

    <ImageView
    android:id="@+id/img_cusine_1"
    android:layout_width="fill_parent"
    android:layout_height="150dp"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:layout_alignParentRight="true"
    android:layout_marginLeft="0dp"
    android:layout_marginTop="2dp"
    android:layout_marginRight="0dp"
    android:scaleType="fitXY"
    android:src="@drawable/food_1" />

    <ImageView
    android:id="@+id/arrow_white"
    android:layout_width="20dp"
    android:layout_height="20dp"
    android:layout_alignBottom="@id/img_cusine_1"
    android:layout_marginLeft="20dp"
    android:layout_marginBottom="30dp"
    android:src="@drawable/white_arrow" />

    <TextView
    android:id="@+id/detail_restaurant_name"
    android:layout_width="183dp"

    android:layout_height="27dp"
    android:layout_alignTop="@+id/arrow_white"
    android:layout_alignBottom="@id/img_cusine_1"
    android:layout_alignParentEnd="true"
    android:layout_alignParentRight="true"

    android:layout_marginStart="20dp"
    android:layout_marginLeft="31dp"
    android:layout_marginTop="-2dp"
    android:layout_marginEnd="125dp"
    android:layout_marginRight="125dp"
    android:layout_marginBottom="30dp"
    android:layout_toEndOf="@+id/arrow_white"
    android:layout_toRightOf="@+id/arrow_white"
    android:text="Restaurant Name"
    android:textColor="@color/white"
    android:textStyle="bold" />
    </RelativeLayout>

    <android.support.v4.widget.NestedScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true"

    >

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

    <RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <TextView
    android:id="@+id/detail_restaurant_name_sub"
    style="@style/RestuarantNames"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentStart="true"
    android:layout_alignParentLeft="true"
    android:layout_marginStart="8dp"
    android:layout_marginLeft="8dp"
    android:text="Restuarant Name" />

    <TextView
    android:id="@+id/detail_restaurant_ratings"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentEnd="true"
    android:layout_alignParentRight="true"
    android:layout_marginEnd="10dp"
    android:layout_marginRight="10dp"
    android:background="@color/textGreen"
    android:text="3.6"
    android:textColor="@color/white"
    tools:ignore="RtlHardcoded" />
    </RelativeLayout>

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

    <TextView
    style="@style/UserLocation"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="2dp"
    android:text="@string/detail_retaurant_list_ratings_header" />

    <ImageView
    android:layout_width="250dp"
    android:layout_height="30dp"
    android:layout_marginTop="2dp"
    android:src="@drawable/rating" />
    </LinearLayout>

    <View
    android:layout_width="match_parent"
    android:layout_height="1dp"
    android:layout_marginTop="5dp"
    android:background="@android:color/darker_gray" />

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

    <TextView
    style="@style/UserLocation"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="2dp"
    android:text="@string/detail_retaurant_list_delivery_place_header" />

    <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="5dp"
    android:orientation="horizontal">

    <ImageView
    android:id="@+id/green_arrow"
    android:layout_width="25dp"
    android:layout_height="25dp"
    android:contentDescription="User Location"
    android:src="@drawable/icon_user_location"
    tools:ignore="HardcodedText" />

    <TextView
    android:id="@+id/user_address"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginStart="15dp"
    android:layout_marginLeft="15dp"
    android:layout_marginTop="3dp"
    android:layout_marginEnd="146dp"
    android:layout_marginRight="146dp"
    android:layout_marginBottom="-6dp"
    android:text="Rajouri Garden"
    android:textStyle="bold"
    tools:ignore="HardcodedText" />

    <!--<TextView
    android:layout_alignParentRight="true"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/user_address_change"
    android:text="@string/user_change"
    android:layout_marginRight="10dp"
    style="@style/User_Green_Font" />-->
    </LinearLayout>

    <View
    android:layout_width="match_parent"
    android:layout_height="1dp"
    android:layout_marginTop="5dp"
    android:background="@android:color/darker_gray" />

    <TextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="5dp"
    android:text="Delivery in 33 minutes.Live tracking available"
    android:textColor="#FF7F50"
    android:textStyle="bold" />

    <View
    android:layout_width="match_parent"
    android:layout_height="1dp"
    android:layout_marginTop="5dp"
    android:background="@android:color/darker_gray" />

    <Switch
    android:id="@+id/vegSwitch"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="2dp"
    android:text="@string/dish_type_veg"
    android:textColor="@color/grey"
    android:textStyle="bold" />

    <TextView
    style="@style/HeaderRestuarantsRecommendations"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="@string/dish_type_best_sellers" />

    <RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.v4.widget.SwipeRefreshLayout
    android:id="@+id/swipe_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

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

    />

    </android.support.v4.widget.SwipeRefreshLayout>

    <com.andremion.counterfab.CounterFab
    android:id="@+id/fab"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true"
    android:layout_alignParentBottom="true"
    android:layout_gravity="bottom|end"
    android:src="@drawable/ic_shopping_cart_black_24dp"
    app:backgroundTint="#3CB371"
    tools:ignore="VectorDrawableCompat" />

    </RelativeLayout>
    </LinearLayout>

    </LinearLayout>
    </android.support.v4.widget.NestedScrollView>

    </LinearLayout>


    Expected result:Need to scroll all elements inside nestedscrollview under Relative layout which has big image.
    Actual:Not able to see nested scrollview ,tried using recyclerview.setnestedscrollingenabled(false) to hide scrolling behaviour of recycler view as well as recyclerview.sethasfixedsize(true) but nothing worked.
    If i dont set above two properties i can see scrolling of recycler view.










    share|improve this question


























      0












      0








      0








      NestedScrollview is not showing up inside Linearlayout having child as relative layout and NestedScrollview with child as recycler view.



      I have tried solution as recyclerview.setnestedscrollingenabled(false) after setting adapter and recyclerview.sethasfixedsize(true) but none is working.



      <?xml version="1.0" encoding="utf-8"?>
      <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_margin="10dp"
      android:orientation="vertical">

      <RelativeLayout
      android:id="@+id/restaurant_list_header"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content">

      <ImageView
      android:id="@+id/img_cusine_1"
      android:layout_width="fill_parent"
      android:layout_height="150dp"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_alignParentRight="true"
      android:layout_marginLeft="0dp"
      android:layout_marginTop="2dp"
      android:layout_marginRight="0dp"
      android:scaleType="fitXY"
      android:src="@drawable/food_1" />

      <ImageView
      android:id="@+id/arrow_white"
      android:layout_width="20dp"
      android:layout_height="20dp"
      android:layout_alignBottom="@id/img_cusine_1"
      android:layout_marginLeft="20dp"
      android:layout_marginBottom="30dp"
      android:src="@drawable/white_arrow" />

      <TextView
      android:id="@+id/detail_restaurant_name"
      android:layout_width="183dp"

      android:layout_height="27dp"
      android:layout_alignTop="@+id/arrow_white"
      android:layout_alignBottom="@id/img_cusine_1"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"

      android:layout_marginStart="20dp"
      android:layout_marginLeft="31dp"
      android:layout_marginTop="-2dp"
      android:layout_marginEnd="125dp"
      android:layout_marginRight="125dp"
      android:layout_marginBottom="30dp"
      android:layout_toEndOf="@+id/arrow_white"
      android:layout_toRightOf="@+id/arrow_white"
      android:text="Restaurant Name"
      android:textColor="@color/white"
      android:textStyle="bold" />
      </RelativeLayout>

      <android.support.v4.widget.NestedScrollView
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fillViewport="true"

      >

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

      <RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content">

      <TextView
      android:id="@+id/detail_restaurant_name_sub"
      style="@style/RestuarantNames"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentStart="true"
      android:layout_alignParentLeft="true"
      android:layout_marginStart="8dp"
      android:layout_marginLeft="8dp"
      android:text="Restuarant Name" />

      <TextView
      android:id="@+id/detail_restaurant_ratings"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"
      android:layout_marginEnd="10dp"
      android:layout_marginRight="10dp"
      android:background="@color/textGreen"
      android:text="3.6"
      android:textColor="@color/white"
      tools:ignore="RtlHardcoded" />
      </RelativeLayout>

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

      <TextView
      style="@style/UserLocation"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginTop="2dp"
      android:text="@string/detail_retaurant_list_ratings_header" />

      <ImageView
      android:layout_width="250dp"
      android:layout_height="30dp"
      android:layout_marginTop="2dp"
      android:src="@drawable/rating" />
      </LinearLayout>

      <View
      android:layout_width="match_parent"
      android:layout_height="1dp"
      android:layout_marginTop="5dp"
      android:background="@android:color/darker_gray" />

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

      <TextView
      style="@style/UserLocation"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginTop="2dp"
      android:text="@string/detail_retaurant_list_delivery_place_header" />

      <LinearLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_margin="5dp"
      android:orientation="horizontal">

      <ImageView
      android:id="@+id/green_arrow"
      android:layout_width="25dp"
      android:layout_height="25dp"
      android:contentDescription="User Location"
      android:src="@drawable/icon_user_location"
      tools:ignore="HardcodedText" />

      <TextView
      android:id="@+id/user_address"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_marginStart="15dp"
      android:layout_marginLeft="15dp"
      android:layout_marginTop="3dp"
      android:layout_marginEnd="146dp"
      android:layout_marginRight="146dp"
      android:layout_marginBottom="-6dp"
      android:text="Rajouri Garden"
      android:textStyle="bold"
      tools:ignore="HardcodedText" />

      <!--<TextView
      android:layout_alignParentRight="true"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/user_address_change"
      android:text="@string/user_change"
      android:layout_marginRight="10dp"
      style="@style/User_Green_Font" />-->
      </LinearLayout>

      <View
      android:layout_width="match_parent"
      android:layout_height="1dp"
      android:layout_marginTop="5dp"
      android:background="@android:color/darker_gray" />

      <TextView
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginTop="5dp"
      android:text="Delivery in 33 minutes.Live tracking available"
      android:textColor="#FF7F50"
      android:textStyle="bold" />

      <View
      android:layout_width="match_parent"
      android:layout_height="1dp"
      android:layout_marginTop="5dp"
      android:background="@android:color/darker_gray" />

      <Switch
      android:id="@+id/vegSwitch"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_marginTop="2dp"
      android:text="@string/dish_type_veg"
      android:textColor="@color/grey"
      android:textStyle="bold" />

      <TextView
      style="@style/HeaderRestuarantsRecommendations"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:text="@string/dish_type_best_sellers" />

      <RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent">

      <android.support.v4.widget.SwipeRefreshLayout
      android:id="@+id/swipe_layout"
      android:layout_width="match_parent"
      android:layout_height="match_parent">

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

      />

      </android.support.v4.widget.SwipeRefreshLayout>

      <com.andremion.counterfab.CounterFab
      android:id="@+id/fab"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentRight="true"
      android:layout_alignParentBottom="true"
      android:layout_gravity="bottom|end"
      android:src="@drawable/ic_shopping_cart_black_24dp"
      app:backgroundTint="#3CB371"
      tools:ignore="VectorDrawableCompat" />

      </RelativeLayout>
      </LinearLayout>

      </LinearLayout>
      </android.support.v4.widget.NestedScrollView>

      </LinearLayout>


      Expected result:Need to scroll all elements inside nestedscrollview under Relative layout which has big image.
      Actual:Not able to see nested scrollview ,tried using recyclerview.setnestedscrollingenabled(false) to hide scrolling behaviour of recycler view as well as recyclerview.sethasfixedsize(true) but nothing worked.
      If i dont set above two properties i can see scrolling of recycler view.










      share|improve this question
















      NestedScrollview is not showing up inside Linearlayout having child as relative layout and NestedScrollview with child as recycler view.



      I have tried solution as recyclerview.setnestedscrollingenabled(false) after setting adapter and recyclerview.sethasfixedsize(true) but none is working.



      <?xml version="1.0" encoding="utf-8"?>
      <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_margin="10dp"
      android:orientation="vertical">

      <RelativeLayout
      android:id="@+id/restaurant_list_header"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content">

      <ImageView
      android:id="@+id/img_cusine_1"
      android:layout_width="fill_parent"
      android:layout_height="150dp"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_alignParentRight="true"
      android:layout_marginLeft="0dp"
      android:layout_marginTop="2dp"
      android:layout_marginRight="0dp"
      android:scaleType="fitXY"
      android:src="@drawable/food_1" />

      <ImageView
      android:id="@+id/arrow_white"
      android:layout_width="20dp"
      android:layout_height="20dp"
      android:layout_alignBottom="@id/img_cusine_1"
      android:layout_marginLeft="20dp"
      android:layout_marginBottom="30dp"
      android:src="@drawable/white_arrow" />

      <TextView
      android:id="@+id/detail_restaurant_name"
      android:layout_width="183dp"

      android:layout_height="27dp"
      android:layout_alignTop="@+id/arrow_white"
      android:layout_alignBottom="@id/img_cusine_1"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"

      android:layout_marginStart="20dp"
      android:layout_marginLeft="31dp"
      android:layout_marginTop="-2dp"
      android:layout_marginEnd="125dp"
      android:layout_marginRight="125dp"
      android:layout_marginBottom="30dp"
      android:layout_toEndOf="@+id/arrow_white"
      android:layout_toRightOf="@+id/arrow_white"
      android:text="Restaurant Name"
      android:textColor="@color/white"
      android:textStyle="bold" />
      </RelativeLayout>

      <android.support.v4.widget.NestedScrollView
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fillViewport="true"

      >

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

      <RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content">

      <TextView
      android:id="@+id/detail_restaurant_name_sub"
      style="@style/RestuarantNames"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentStart="true"
      android:layout_alignParentLeft="true"
      android:layout_marginStart="8dp"
      android:layout_marginLeft="8dp"
      android:text="Restuarant Name" />

      <TextView
      android:id="@+id/detail_restaurant_ratings"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"
      android:layout_marginEnd="10dp"
      android:layout_marginRight="10dp"
      android:background="@color/textGreen"
      android:text="3.6"
      android:textColor="@color/white"
      tools:ignore="RtlHardcoded" />
      </RelativeLayout>

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

      <TextView
      style="@style/UserLocation"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginTop="2dp"
      android:text="@string/detail_retaurant_list_ratings_header" />

      <ImageView
      android:layout_width="250dp"
      android:layout_height="30dp"
      android:layout_marginTop="2dp"
      android:src="@drawable/rating" />
      </LinearLayout>

      <View
      android:layout_width="match_parent"
      android:layout_height="1dp"
      android:layout_marginTop="5dp"
      android:background="@android:color/darker_gray" />

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

      <TextView
      style="@style/UserLocation"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginTop="2dp"
      android:text="@string/detail_retaurant_list_delivery_place_header" />

      <LinearLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_margin="5dp"
      android:orientation="horizontal">

      <ImageView
      android:id="@+id/green_arrow"
      android:layout_width="25dp"
      android:layout_height="25dp"
      android:contentDescription="User Location"
      android:src="@drawable/icon_user_location"
      tools:ignore="HardcodedText" />

      <TextView
      android:id="@+id/user_address"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_marginStart="15dp"
      android:layout_marginLeft="15dp"
      android:layout_marginTop="3dp"
      android:layout_marginEnd="146dp"
      android:layout_marginRight="146dp"
      android:layout_marginBottom="-6dp"
      android:text="Rajouri Garden"
      android:textStyle="bold"
      tools:ignore="HardcodedText" />

      <!--<TextView
      android:layout_alignParentRight="true"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/user_address_change"
      android:text="@string/user_change"
      android:layout_marginRight="10dp"
      style="@style/User_Green_Font" />-->
      </LinearLayout>

      <View
      android:layout_width="match_parent"
      android:layout_height="1dp"
      android:layout_marginTop="5dp"
      android:background="@android:color/darker_gray" />

      <TextView
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginTop="5dp"
      android:text="Delivery in 33 minutes.Live tracking available"
      android:textColor="#FF7F50"
      android:textStyle="bold" />

      <View
      android:layout_width="match_parent"
      android:layout_height="1dp"
      android:layout_marginTop="5dp"
      android:background="@android:color/darker_gray" />

      <Switch
      android:id="@+id/vegSwitch"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_marginTop="2dp"
      android:text="@string/dish_type_veg"
      android:textColor="@color/grey"
      android:textStyle="bold" />

      <TextView
      style="@style/HeaderRestuarantsRecommendations"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:text="@string/dish_type_best_sellers" />

      <RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent">

      <android.support.v4.widget.SwipeRefreshLayout
      android:id="@+id/swipe_layout"
      android:layout_width="match_parent"
      android:layout_height="match_parent">

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

      />

      </android.support.v4.widget.SwipeRefreshLayout>

      <com.andremion.counterfab.CounterFab
      android:id="@+id/fab"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentRight="true"
      android:layout_alignParentBottom="true"
      android:layout_gravity="bottom|end"
      android:src="@drawable/ic_shopping_cart_black_24dp"
      app:backgroundTint="#3CB371"
      tools:ignore="VectorDrawableCompat" />

      </RelativeLayout>
      </LinearLayout>

      </LinearLayout>
      </android.support.v4.widget.NestedScrollView>

      </LinearLayout>


      Expected result:Need to scroll all elements inside nestedscrollview under Relative layout which has big image.
      Actual:Not able to see nested scrollview ,tried using recyclerview.setnestedscrollingenabled(false) to hide scrolling behaviour of recycler view as well as recyclerview.sethasfixedsize(true) but nothing worked.
      If i dont set above two properties i can see scrolling of recycler view.







      android android-recyclerview android-linearlayout android-relativelayout android-nestedscrollview






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 26 at 17:04









      Fantômas

      33.5k15 gold badges66 silver badges93 bronze badges




      33.5k15 gold badges66 silver badges93 bronze badges










      asked Mar 26 at 16:33









      Sonal SSonal S

      35 bronze badges




      35 bronze badges






















          0






          active

          oldest

          votes










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55362053%2fnestedscrollview-not-working-inside-a-linearlayout-which-has-child-as-relative-l%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55362053%2fnestedscrollview-not-working-inside-a-linearlayout-which-has-child-as-relative-l%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해