I am trying to show the layout properly but sometimes it's not showing properly I don't know what is happening i'll try but don't find any problem.
output that i am getting sometimes
when i scroll it's work fine again please help me why I am getting this output sometimes
this is my layout resource file :
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout 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"
tools:context=".activity.MainActivity"
android:background="#color/white">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:id="#+id/appbar"
android:theme="#style/AppTheme.AppBarOverlay">
<android.support.design.widget.CollapsingToolbarLayout
android:layout_width="match_parent"
android:id="#+id/ctolbar"
android:fitsSystemWindows="true"
app:contentScrim="#color/colorPrimary"
app:expandedTitleMargin="5dp"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="#dimen/_200sdp"
android:orientation="vertical">
<RelativeLayout
android:id="#+id/layout_top"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.view.ViewPager
android:id="#+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
<me.relex.circleindicator.CircleIndicator
android:id="#+id/indicator"
android:layout_width="match_parent"
android:layout_height="#dimen/_48sdp"
android:layout_gravity="bottom"
app:ci_animator="#animator/indicator_animator"
app:ci_animator_reverse="#animator/indicator_animator_reverse"
app:ci_drawable="#drawable/black_radius_square"
app:ci_height="#dimen/_4sdp"
app:ci_margin="#dimen/_6sdp"
android:layout_marginBottom="#dimen/_5sdp"
app:ci_width="#dimen/_10sdp"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
</RelativeLayout>
<!--<View
android:layout_width="match_parent"
android:layout_height="160dp"
android:layout_gravity="bottom"
android:background="#drawable/scrim"/>-->
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="#style/ThemeOverlay.AppCompat.Light" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:textSize="#dimen/_2sdp"
android:textColor="#4D212121"
android:text="MM" />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:id="#+id/nested"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
android:layout_marginBottom="#dimen/_45sdp"
app:behavior_overlapTop="#dimen/_34sdp"
android:layout_height="match_parent">
<LinearLayout
android:id="#+id/lnmain"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
android:layout_marginTop="#dimen/_15sdp"
android:orientation="vertical">
<RelativeLayout
android:id="#+id/rlsearch"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:descendantFocusability="beforeDescendants"
android:focusableInTouchMode="true">
<EditText
android:id="#+id/editsearch"
android:layout_width="match_parent"
android:layout_height="#dimen/_40sdp"
android:background="#drawable/search_edittext"
android:hint="Search Events"
android:shadowColor = "#39ffff"
android:focusableInTouchMode="true"
android:maxLength="100"
android:paddingLeft="#dimen/_10sdp"
android:paddingRight="#dimen/_10sdp"
android:layout_marginRight="#dimen/_5sdp"
android:layout_marginLeft="#dimen/_5sdp"
android:textColor="#color/black"
android:singleLine="true"
android:imeOptions="actionDone"
android:drawableRight="#drawable/ic_search_black_24dp"
android:layout_marginBottom="#dimen/_5sdp"/>
</RelativeLayout>
<LinearLayout
android:id="#+id/lnweekend"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="#dimen/_10sdp"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_marginTop="#dimen/_5sdp"
android:layout_marginBottom="#dimen/_5sdp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/_10sdp"
android:orientation="horizontal">
<TextView
android:id="#+id/tvweekend"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_weight="1"
android:textSize="#dimen/_15sdp"
android:textColor="#color/black"
android:text="Popular This Weekend"/>
<TextView
android:id="#+id/tvweekendviewmore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_weight="1"
android:layout_gravity="right|center_vertical"
android:textColor="#color/text"
android:textSize="#dimen/_10sdp"
android:text="#string/more"/>
</LinearLayout>
<com.takusemba.multisnaprecyclerview.MultiSnapRecyclerView
android:id="#+id/rvweekend"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
app:msrv_gravity="start"
app:msrv_ms_per_inch="#dimen/normal_speed"
app:msrv_snap_count="1" />
</LinearLayout>
<LinearLayout
android:id="#+id/lnevents"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="#dimen/_10sdp"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_marginTop="#dimen/_5sdp"
android:layout_marginBottom="#dimen/_5sdp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/_10sdp"
android:orientation="horizontal">
<TextView
android:id="#+id/tvevents"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_weight="1"
android:textSize="#dimen/_15sdp"
android:textColor="#color/black"
android:text="Popular Events"/>
<TextView
android:id="#+id/tveventsviewmore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_weight="1"
android:layout_gravity="right|center_vertical"
android:textColor="#color/text"
android:textSize="#dimen/_10sdp"
android:text="#string/more"/>
</LinearLayout>
<com.takusemba.multisnaprecyclerview.MultiSnapRecyclerView
android:id="#+id/rvevents"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
app:msrv_gravity="start"
app:msrv_ms_per_inch="#dimen/normal_speed"
app:msrv_snap_count="1" />
</LinearLayout>
<LinearLayout
android:id="#+id/lnconcert"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="#dimen/_10sdp"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_marginTop="#dimen/_5sdp"
android:layout_marginBottom="#dimen/_5sdp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/_10sdp"
android:orientation="horizontal">
<TextView
android:id="#+id/tvconsert"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_weight="1"
android:textSize="#dimen/_15sdp"
android:textColor="#color/black"
android:text="Trending Concerts"/>
<TextView
android:id="#+id/tvconsertviewmore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_weight="1"
android:layout_gravity="right|center_vertical"
android:textColor="#color/text"
android:textSize="#dimen/_10sdp"
android:text="#string/more"/>
</LinearLayout>
<com.takusemba.multisnaprecyclerview.MultiSnapRecyclerView
android:id="#+id/rvconcert"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
app:msrv_gravity="start"
app:msrv_ms_per_inch="#dimen/normal_speed"
app:msrv_snap_count="1" />
</LinearLayout>
<LinearLayout
android:id="#+id/lnsport"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="#dimen/_10sdp"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_marginTop="#dimen/_5sdp"
android:layout_marginBottom="#dimen/_5sdp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/_10sdp"
android:orientation="horizontal">
<TextView
android:id="#+id/tvsport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_weight="1"
android:textSize="#dimen/_15sdp"
android:textColor="#color/black"
android:text="Trending Sports"/>
<TextView
android:id="#+id/tvsportviewmore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_weight="1"
android:layout_gravity="right|center_vertical"
android:textColor="#color/text"
android:textSize="#dimen/_10sdp"
android:text="#string/more"/>
</LinearLayout>
<com.takusemba.multisnaprecyclerview.MultiSnapRecyclerView
android:id="#+id/rvsports"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
app:msrv_gravity="start"
app:msrv_ms_per_inch="#dimen/normal_speed"
app:msrv_snap_count="1" />
<!--<android.support.v7.widget.RecyclerView
android:id="#+id/rvsports"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:scrollbars="horizontal" />-->
</LinearLayout>
<LinearLayout
android:id="#+id/lntheater"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="#dimen/_10sdp"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_marginTop="#dimen/_5sdp"
android:layout_marginBottom="#dimen/_5sdp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/_10sdp"
android:orientation="horizontal">
<TextView
android:id="#+id/tvtheater"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_weight="1"
android:textSize="#dimen/_15sdp"
android:textColor="#color/black"
android:text="Trending Theater"/>
<TextView
android:id="#+id/tvtheaterviewmore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_weight="1"
android:layout_gravity="right|center_vertical"
android:textColor="#color/text"
android:textSize="#dimen/_10sdp"
android:text="#string/more"/>
</LinearLayout>
<com.takusemba.multisnaprecyclerview.MultiSnapRecyclerView
android:id="#+id/rvtheater"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
app:msrv_gravity="start"
app:msrv_ms_per_inch="#dimen/normal_speed"
app:msrv_snap_count="1" />
<!--<android.support.v7.widget.RecyclerView
android:id="#+id/rvtheater"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:scrollbars="horizontal" />-->
</LinearLayout>
<LinearLayout
android:id="#+id/lnother"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="#dimen/_10sdp"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_marginTop="#dimen/_5sdp"
android:layout_marginBottom="#dimen/_5sdp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/_10sdp"
android:orientation="horizontal">
<TextView
android:id="#+id/tvother"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_weight="1"
android:textSize="#dimen/_15sdp"
android:textColor="#color/black"
android:text="Trending Other"/>
<TextView
android:id="#+id/tvotherviewmore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_weight="1"
android:layout_gravity="right|center_vertical"
android:textColor="#color/text"
android:textSize="#dimen/_10sdp"
android:text="#string/more"/>
</LinearLayout>
<com.takusemba.multisnaprecyclerview.MultiSnapRecyclerView
android:id="#+id/rvother"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
app:msrv_gravity="start"
app:msrv_ms_per_inch="#dimen/normal_speed"
app:msrv_snap_count="1" />
<!--<android.support.v7.widget.RecyclerView
android:id="#+id/rvother"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:scrollbars="horizontal" />-->
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:textSize="#dimen/_2sdp"
android:textColor="#4D212121"
android:text="MM" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<ProgressBar
android:visibility="gone"
android:id="#+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true"
android:layout_gravity="center"
android:indeterminateTint="#color/colorPrimary"
android:layout_centerVertical="true" />
<io.saeid.fabloading.LoadingView
android:id="#+id/loading_view_repeat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:mfl_onclickLoading="true"
android:layout_gravity="center"
android:visibility="visible"
android:scaleX="1"
android:scaleY="1"
app:mfl_duration="400"
app:mfl_repeat="100" />
<LinearLayout
android:id="#+id/lnloading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_horizontal"
android:layout_marginTop="#dimen/_80sdp"
android:visibility="visible"
android:orientation="horizontal">
<TextView
android:id="#+id/tvloading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/loading"
android:textColor="#color/black"
android:layout_marginRight="#dimen/_5sdp"
android:textStyle="bold"
android:textSize="#dimen/_10sdp"/>
<com.bhargavms.dotloader.DotLoader
android:layout_width="wrap_content"
android:layout_height="#dimen/_10sdp"
app:dot_radius="#dimen/_2sdp"
app:color_array="#array/dot_colors"
android:layout_gravity="bottom"
app:number_of_dots="3"/>
</LinearLayout>
<RelativeLayout
android:id="#+id/rlerror"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:layout_gravity="center">
<ImageView
android:id="#+id/imgerror"
android:layout_width="#dimen/_125sdp"
android:layout_height="#dimen/_125sdp"
android:visibility="visible"
android:layout_centerHorizontal="true"
android:background="#drawable/no_conncectionp" />
<TextView
android:id="#+id/tverror"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="visible"
android:textColor="#color/black"
android:textStyle="bold"
android:layout_centerHorizontal="true"
android:textSize="#dimen/_18sdp"
android:layout_marginTop="#dimen/_10sdp"
android:layout_below="#id/imgerror"
android:text="Whoops" />
<TextView
android:id="#+id/tvstatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="visible"
android:textColor="#color/text"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/_10sdp"
android:layout_gravity="center_horizontal"
android:textSize="#dimen/album_title"
android:layout_below="#id/tverror"
android:text="No Data" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/bottomnavigation"
android:layout_width="match_parent"
android:layout_height="#dimen/_45sdp"
android:layout_gravity="bottom"
android:layout_alignParentBottom="true">
<com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx
android:id="#+id/bottomNavViewBar"
android:layout_width="match_parent"
android:layout_height="#dimen/_43sdp"
android:layout_alignParentBottom="true"
android:background="#android:color/white"
app:itemIconTint="#color/selector_item_primary_color"
app:itemTextColor="#color/selector_item_primary_color"
app:menu="#menu/bottom_navigation_menu_3" />
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout>
I tried everything but i don't understand why is this happening.
try using putting an anchor to your nestedscrollview
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="#+id/nested"
android:layout_marginBottom="#dimen/_45sdp"
app:behavior_overlapTop="#dimen/_34sdp"
app:layout_anchor="#id/appbar"
app:layout_behavior="#string/appbar_scrolling_view_behavior">
and why your CollapsingToolbarLayout have height=matchparent
Related
I am using CollapsingToolbarLayout in my app and everything working great except displaying toolbar icons when the CollapsingToolbarLayout collapse.These menu items, they are showing correctly when the CollapsingToolbarLayout expand. But getting hide when the CollapsingToolbarLayout collapse. I want to show them even when it is in the collapse position.
My xml....
<android.support.design.widget.CoordinatorLayout 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:id="#+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.ViewDetailsActivity">
<android.support.design.widget.AppBarLayout
android:id="#+id/MyAppbar"
android:layout_width="match_parent"
android:layout_height="#dimen/_180sdp"
android:fitsSystemWindows="true">
<android.support.design.widget.CollapsingToolbarLayout
android:id="#+id/collapse_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/material_deep_teal_500"
android:fitsSystemWindows="true"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.view.ViewPager
android:id="#+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:scaleType="centerCrop"
app:layout_collapseMode="pin" />
<com.tbuonomo.viewpagerdotsindicator.DotsIndicator
android:id="#+id/dots_indicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:gravity="bottom|center"
android:padding="#dimen/_8sdp"
app:dotsColor="#color/white"
app:dotsCornerRadius="#dimen/_6sdp"
app:dotsSize="#dimen/_8sdp"
app:dotsSpacing="#dimen/_2sdp"
app:dotsWidthFactor="2"
app:progressMode="true" />
</RelativeLayout>
<android.support.v7.widget.Toolbar
android:id="#+id/MyToolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="parallax" />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="fill_vertical"
android:background="#ffffff"
app:layout_behavior="#string/appbar_scrolling_view_behavior">
<LinearLayout
android:id="#+id/fullLinearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="#dimen/_4sdp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="#dimen/_2sdp"
android:weightSum="3">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="bottom">
<TextView
android:id="#+id/priceTxt"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fontFamily="#font/quicksand_medium"
android:gravity="bottom"
android:textColor="#color/black"
android:textSize="#dimen/_16ssp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="bottom">
<TextView
android:id="#+id/bedTxt"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="#+id/typeTxt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="#dimen/_2sdp"
android:paddingTop="#dimen/_1sdp"
android:paddingEnd="#dimen/_2sdp"
android:paddingBottom="#dimen/_1sdp"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp" />
<TextView
android:id="#+id/addressTxt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="#dimen/_2sdp"
android:paddingTop="#dimen/_1sdp"
android:paddingEnd="#dimen/_2sdp"
android:paddingBottom="#dimen/_2sdp"
android:textSize="#dimen/_12ssp" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_5sdp">
<com.github.ybq.android.spinkit.SpinKitView xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="#+id/details_spin_kit"
style="#style/SpinKitView.FadingCircle"
android:layout_width="#dimen/_40sdp"
android:layout_height="#dimen/_40sdp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:padding="#dimen/_5sdp"
app:SpinKit_Color="#color/colorAccent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:text="Facts"
android:textColor="#color/black"
android:textSize="#dimen/_16ssp"
android:textStyle="bold"
tools:fontFamily="#font/raleway" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_4sdp"
android:baselineAligned="false"
android:orientation="horizontal"
android:weightSum="2">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:text="Reference"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:text="RERA permit No."
android:textColor="#color/black"
android:textSize="#dimen/_12ssp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:text="Type"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:text="Bedrooms"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:text="Bathrooms"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:text="Price"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:text="Area"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="#+id/txtRef"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp"
android:textStyle="bold" />
<TextView
android:id="#+id/txtRera"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp"
android:textStyle="bold" />
<TextView
android:id="#+id/txtType"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp"
android:textStyle="bold" />
<TextView
android:id="#+id/txtBedRooms"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp"
android:textStyle="bold" />
<TextView
android:id="#+id/txtBathrooms"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp"
android:textStyle="bold" />
<TextView
android:id="#+id/txtPrice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp"
android:textStyle="bold" />
<TextView
android:id="#+id/txtArea"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_5sdp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:text="Amenities"
android:textColor="#color/black"
android:textSize="#dimen/_16ssp"
android:textStyle="bold"
tools:fontFamily="#font/raleway" />
<android.support.v7.widget.RecyclerView
android:id="#+id/amenityRecyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_2sdp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_5sdp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:text="About the area"
android:textColor="#color/black"
android:textSize="#dimen/_16ssp"
android:textStyle="bold"
tools:fontFamily="#font/raleway" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_4sdp"
android:orientation="horizontal"
android:weightSum="2">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:text="Region"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:text="City"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:text="District"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="#+id/txtCity"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp"
android:textStyle="bold" />
<TextView
android:id="#+id/txtDistrict"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp"
android:textStyle="bold" />
<TextView
android:id="#+id/txtProvince"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:padding="#dimen/_2sdp"
android:textColor="#color/black"
android:textSize="#dimen/_12ssp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="#dimen/_5sdp"
android:layout_marginBottom="#dimen/_100sdp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/raleway"
android:text="Property description"
android:textColor="#color/black"
android:textSize="#dimen/_16ssp"
android:textStyle="bold"
tools:fontFamily="#font/raleway" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="#dimen/_4sdp">
<WebView
android:id="#+id/descriptionWebView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<LinearLayout
android:id="#+id/commLinearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="#drawable/layout_shadow"
android:gravity="bottom"
android:weightSum="3">
<LinearLayout
android:id="#+id/layoutEmail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="#dimen/_2sdp"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical"
android:padding="#dimen/_2sdp">
<ImageView
android:layout_width="match_parent"
android:layout_height="#dimen/_20sdp"
android:src="#drawable/email" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="EMAIL"
android:textColor="#F84242"
android:textSize="#dimen/_8ssp" />
</LinearLayout>
<LinearLayout
android:id="#+id/layoutSms"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="#dimen/_2sdp"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical"
android:padding="#dimen/_2sdp">
<ImageView
android:layout_width="match_parent"
android:layout_height="#dimen/_20sdp"
android:src="#drawable/sms" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="SMS"
android:textColor="#F84242"
android:textSize="#dimen/_8ssp" />
</LinearLayout>
<LinearLayout
android:id="#+id/layoutCaller"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="#dimen/_2sdp"
android:layout_weight="1"
android:autoLink="phone"
android:gravity="center"
android:orientation="vertical"
android:padding="#dimen/_2sdp">
<ImageView
android:layout_width="match_parent"
android:layout_height="#dimen/_20sdp"
android:src="#drawable/call" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="CALL"
android:textColor="#F84242"
android:textSize="#dimen/_8ssp" />
</LinearLayout>
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
Add this line to your toolbar
app:layout_collapseMode="pin"
Your toolbar should look like this:
<android.support.v7.widget.Toolbar
android:id="#+id/MyToolbar"
app:layout_collapseMode="pin"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="parallax" />
I am trying to show the layout properly but sometimes it's not showing properly I don't know what is happening i'll try but don't find any problem.
output that i am getting some times
when i scroll it's work fine again please help me why I am getting this output sometimes
this is my layout resource file :
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout 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"
tools:context=".activity.MainActivity"
android:background="#color/white">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:id="#+id/appbar"
android:theme="#style/AppTheme.AppBarOverlay">
<android.support.design.widget.CollapsingToolbarLayout
android:layout_width="match_parent"
android:id="#+id/ctolbar"
android:fitsSystemWindows="true"
app:contentScrim="#color/colorPrimary"
app:expandedTitleMargin="5dp"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="#dimen/_200sdp"
android:orientation="vertical">
<RelativeLayout
android:id="#+id/layout_top"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.view.ViewPager
android:id="#+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
<me.relex.circleindicator.CircleIndicator
android:id="#+id/indicator"
android:layout_width="match_parent"
android:layout_height="#dimen/_48sdp"
android:layout_gravity="bottom"
app:ci_animator="#animator/indicator_animator"
app:ci_animator_reverse="#animator/indicator_animator_reverse"
app:ci_drawable="#drawable/black_radius_square"
app:ci_height="#dimen/_4sdp"
app:ci_margin="#dimen/_6sdp"
android:layout_marginBottom="#dimen/_5sdp"
app:ci_width="#dimen/_10sdp"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
</RelativeLayout>
<!--<View
android:layout_width="match_parent"
android:layout_height="160dp"
android:layout_gravity="bottom"
android:background="#drawable/scrim"/>-->
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="#style/ThemeOverlay.AppCompat.Light" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:textSize="#dimen/_2sdp"
android:textColor="#4D212121"
android:text="MM" />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:id="#+id/nested"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
android:layout_marginBottom="#dimen/_45sdp"
app:behavior_overlapTop="#dimen/_34sdp"
android:layout_height="match_parent">
<LinearLayout
android:id="#+id/lnmain"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
android:layout_marginTop="#dimen/_15sdp"
android:orientation="vertical">
<RelativeLayout
android:id="#+id/rlsearch"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:descendantFocusability="beforeDescendants"
android:focusableInTouchMode="true">
<EditText
android:id="#+id/editsearch"
android:layout_width="match_parent"
android:layout_height="#dimen/_40sdp"
android:background="#drawable/search_edittext"
android:hint="Search Events"
android:shadowColor = "#39ffff"
android:focusableInTouchMode="true"
android:maxLength="100"
android:paddingLeft="#dimen/_10sdp"
android:paddingRight="#dimen/_10sdp"
android:layout_marginRight="#dimen/_5sdp"
android:layout_marginLeft="#dimen/_5sdp"
android:textColor="#color/black"
android:singleLine="true"
android:imeOptions="actionDone"
android:drawableRight="#drawable/ic_search_black_24dp"
android:layout_marginBottom="#dimen/_5sdp"/>
</RelativeLayout>
<LinearLayout
android:id="#+id/lnweekend"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="#dimen/_10sdp"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_marginTop="#dimen/_5sdp"
android:layout_marginBottom="#dimen/_5sdp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/_10sdp"
android:orientation="horizontal">
<TextView
android:id="#+id/tvweekend"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_weight="1"
android:textSize="#dimen/_15sdp"
android:textColor="#color/black"
android:text="Popular This Weekend"/>
<TextView
android:id="#+id/tvweekendviewmore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_weight="1"
android:layout_gravity="right|center_vertical"
android:textColor="#color/text"
android:textSize="#dimen/_10sdp"
android:text="#string/more"/>
</LinearLayout>
<com.takusemba.multisnaprecyclerview.MultiSnapRecyclerView
android:id="#+id/rvweekend"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
app:msrv_gravity="start"
app:msrv_ms_per_inch="#dimen/normal_speed"
app:msrv_snap_count="1" />
</LinearLayout>
<LinearLayout
android:id="#+id/lnevents"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="#dimen/_10sdp"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_marginTop="#dimen/_5sdp"
android:layout_marginBottom="#dimen/_5sdp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/_10sdp"
android:orientation="horizontal">
<TextView
android:id="#+id/tvevents"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_weight="1"
android:textSize="#dimen/_15sdp"
android:textColor="#color/black"
android:text="Popular Events"/>
<TextView
android:id="#+id/tveventsviewmore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_weight="1"
android:layout_gravity="right|center_vertical"
android:textColor="#color/text"
android:textSize="#dimen/_10sdp"
android:text="#string/more"/>
</LinearLayout>
<com.takusemba.multisnaprecyclerview.MultiSnapRecyclerView
android:id="#+id/rvevents"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
app:msrv_gravity="start"
app:msrv_ms_per_inch="#dimen/normal_speed"
app:msrv_snap_count="1" />
</LinearLayout>
<LinearLayout
android:id="#+id/lnconcert"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="#dimen/_10sdp"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_marginTop="#dimen/_5sdp"
android:layout_marginBottom="#dimen/_5sdp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/_10sdp"
android:orientation="horizontal">
<TextView
android:id="#+id/tvconsert"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_weight="1"
android:textSize="#dimen/_15sdp"
android:textColor="#color/black"
android:text="Trending Concerts"/>
<TextView
android:id="#+id/tvconsertviewmore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_weight="1"
android:layout_gravity="right|center_vertical"
android:textColor="#color/text"
android:textSize="#dimen/_10sdp"
android:text="#string/more"/>
</LinearLayout>
<com.takusemba.multisnaprecyclerview.MultiSnapRecyclerView
android:id="#+id/rvconcert"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
app:msrv_gravity="start"
app:msrv_ms_per_inch="#dimen/normal_speed"
app:msrv_snap_count="1" />
</LinearLayout>
<LinearLayout
android:id="#+id/lnsport"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="#dimen/_10sdp"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_marginTop="#dimen/_5sdp"
android:layout_marginBottom="#dimen/_5sdp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/_10sdp"
android:orientation="horizontal">
<TextView
android:id="#+id/tvsport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_weight="1"
android:textSize="#dimen/_15sdp"
android:textColor="#color/black"
android:text="Trending Sports"/>
<TextView
android:id="#+id/tvsportviewmore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_weight="1"
android:layout_gravity="right|center_vertical"
android:textColor="#color/text"
android:textSize="#dimen/_10sdp"
android:text="#string/more"/>
</LinearLayout>
<com.takusemba.multisnaprecyclerview.MultiSnapRecyclerView
android:id="#+id/rvsports"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
app:msrv_gravity="start"
app:msrv_ms_per_inch="#dimen/normal_speed"
app:msrv_snap_count="1" />
<!--<android.support.v7.widget.RecyclerView
android:id="#+id/rvsports"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:scrollbars="horizontal" />-->
</LinearLayout>
<LinearLayout
android:id="#+id/lntheater"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="#dimen/_10sdp"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_marginTop="#dimen/_5sdp"
android:layout_marginBottom="#dimen/_5sdp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/_10sdp"
android:orientation="horizontal">
<TextView
android:id="#+id/tvtheater"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_weight="1"
android:textSize="#dimen/_15sdp"
android:textColor="#color/black"
android:text="Trending Theater"/>
<TextView
android:id="#+id/tvtheaterviewmore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_weight="1"
android:layout_gravity="right|center_vertical"
android:textColor="#color/text"
android:textSize="#dimen/_10sdp"
android:text="#string/more"/>
</LinearLayout>
<com.takusemba.multisnaprecyclerview.MultiSnapRecyclerView
android:id="#+id/rvtheater"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
app:msrv_gravity="start"
app:msrv_ms_per_inch="#dimen/normal_speed"
app:msrv_snap_count="1" />
<!--<android.support.v7.widget.RecyclerView
android:id="#+id/rvtheater"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:scrollbars="horizontal" />-->
</LinearLayout>
<LinearLayout
android:id="#+id/lnother"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="#dimen/_10sdp"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_marginTop="#dimen/_5sdp"
android:layout_marginBottom="#dimen/_5sdp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/_10sdp"
android:orientation="horizontal">
<TextView
android:id="#+id/tvother"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_weight="1"
android:textSize="#dimen/_15sdp"
android:textColor="#color/black"
android:text="Trending Other"/>
<TextView
android:id="#+id/tvotherviewmore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_weight="1"
android:layout_gravity="right|center_vertical"
android:textColor="#color/text"
android:textSize="#dimen/_10sdp"
android:text="#string/more"/>
</LinearLayout>
<com.takusemba.multisnaprecyclerview.MultiSnapRecyclerView
android:id="#+id/rvother"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
app:msrv_gravity="start"
app:msrv_ms_per_inch="#dimen/normal_speed"
app:msrv_snap_count="1" />
<!--<android.support.v7.widget.RecyclerView
android:id="#+id/rvother"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:scrollbars="horizontal" />-->
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:textSize="#dimen/_2sdp"
android:textColor="#4D212121"
android:text="MM" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<ProgressBar
android:visibility="gone"
android:id="#+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true"
android:layout_gravity="center"
android:indeterminateTint="#color/colorPrimary"
android:layout_centerVertical="true" />
<io.saeid.fabloading.LoadingView
android:id="#+id/loading_view_repeat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:mfl_onclickLoading="true"
android:layout_gravity="center"
android:visibility="visible"
android:scaleX="1"
android:scaleY="1"
app:mfl_duration="400"
app:mfl_repeat="100" />
<LinearLayout
android:id="#+id/lnloading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_horizontal"
android:layout_marginTop="#dimen/_80sdp"
android:visibility="visible"
android:orientation="horizontal">
<TextView
android:id="#+id/tvloading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/loading"
android:textColor="#color/black"
android:layout_marginRight="#dimen/_5sdp"
android:textStyle="bold"
android:textSize="#dimen/_10sdp"/>
<com.bhargavms.dotloader.DotLoader
android:layout_width="wrap_content"
android:layout_height="#dimen/_10sdp"
app:dot_radius="#dimen/_2sdp"
app:color_array="#array/dot_colors"
android:layout_gravity="bottom"
app:number_of_dots="3"/>
</LinearLayout>
<RelativeLayout
android:id="#+id/rlerror"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:layout_gravity="center">
<ImageView
android:id="#+id/imgerror"
android:layout_width="#dimen/_125sdp"
android:layout_height="#dimen/_125sdp"
android:visibility="visible"
android:layout_centerHorizontal="true"
android:background="#drawable/no_conncectionp" />
<TextView
android:id="#+id/tverror"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="visible"
android:textColor="#color/black"
android:textStyle="bold"
android:layout_centerHorizontal="true"
android:textSize="#dimen/_18sdp"
android:layout_marginTop="#dimen/_10sdp"
android:layout_below="#id/imgerror"
android:text="Whoops" />
<TextView
android:id="#+id/tvstatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="visible"
android:textColor="#color/text"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/_10sdp"
android:layout_gravity="center_horizontal"
android:textSize="#dimen/album_title"
android:layout_below="#id/tverror"
android:text="No Data" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/bottomnavigation"
android:layout_width="match_parent"
android:layout_height="#dimen/_45sdp"
android:layout_gravity="bottom"
android:layout_alignParentBottom="true">
<com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx
android:id="#+id/bottomNavViewBar"
android:layout_width="match_parent"
android:layout_height="#dimen/_43sdp"
android:layout_alignParentBottom="true"
android:background="#android:color/white"
app:itemIconTint="#color/selector_item_primary_color"
app:itemTextColor="#color/selector_item_primary_color"
app:menu="#menu/bottom_navigation_menu_3" />
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout>
Please help me I don't know what is wrong with this please suggest me.
Any help would be highly appreciated
please check your NestedScrollView view it's working or not
Below is my xml some of layout is below which is not fit on screen so I have applied ScrollView on parent LinearLayout that linear layout is applied with weight but when I am trying to scroll that layout its not scrolling. Can any one suggest me where and what I am doing wrong why ScrollView is not working on weight LinearLayout ?
<ScrollView
android:id="#+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:weightSum="2"
app:layout_behavior="#string/appbar_scrolling_view_behavior">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingLeft="#dimen/baseline_grid_7x"
android:paddingRight="#dimen/baseline_grid_7x"
android:paddingTop="#dimen/baseline_grid_7x">
<android.support.v4.view.ViewPager
android:id="#+id/pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/textView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
app:adapter="#{imageSlideradapter}"
app:currentItem="#{landingLoginViewModel.currentPage}"
android:addOnPageChangeListener="#{landingLoginViewModel.pageChangeListener}"/>
<TextView
android:id="#+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/indicator"
android:fontFamily="sans-serif"
android:gravity="center_horizontal"
android:lineSpacingExtra="#dimen/text_land_spacing"
android:paddingTop="#dimen/layout_padding_top"
android:text="#string/label_businesscard_title"
android:textColor="#3e4360"
android:textSize="#dimen/businees_card_textmessage_size"
android:textStyle="normal" />
<com.viewpagerindicator.CirclePageIndicator
android:id="#+id/indicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:paddingTop="#dimen/padding_top_15dp"
app:centered="true"
app:fillColor="#1ebad6"
app:radius="#{landingLoginViewModel.pagerIndicatorCircle}"
app:pageColor="#c6caca"
app:snap="false" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingLeft="#dimen/baseline_grid_2.5x"
android:paddingRight="#dimen/baseline_grid_2.5x"
android:paddingTop="#dimen/baseline_grid_5x">
<android.support.v7.widget.AppCompatButton
android:id="#+id/btn_signin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#drawable/buttonbackroudnd"
android:onClick="#{()->landingLoginViewModel.onSignIn()}"
android:text="#string/label_sign_in"
android:textColor="#ffffff" />
<android.support.v7.widget.AppCompatButton
android:id="#+id/btn_signup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/btn_signin"
android:layout_marginTop="#dimen/baseline_grid_3.5x"
android:background="#drawable/roundbuttonborder"
android:onClick="#{()->landingLoginViewModel.onSignUp()}"
android:text="#string/label_sign_up"
android:textColor="#00becc" />
<android.support.v7.widget.AppCompatTextView
android:id="#+id/oRtextLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/btn_signup"
android:layout_marginTop="#dimen/baseline_grid_5.5x"
android:fontFamily="sans-serif"
android:gravity="center"
android:text="#string/label_or"
android:textColor="#8998a7"
android:textSize="14sp"
android:textStyle="normal"
/>
<LinearLayout
android:id="#+id/linearlayout4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_below="#+id/oRtextLabel"
android:gravity="center"
android:onClick="#{()->landingLoginViewModel.onFacebook()}"
android:orientation="horizontal"
android:layout_marginTop="#dimen/baseline_grid_5x">
<ImageView
android:layout_width="#dimen/baseline_grid_3.5x"
android:layout_height="#dimen/baseline_grid_3.5x"
android:src="#drawable/fb_icon" />
<android.support.v7.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-medium"
android:gravity="center_horizontal"
android:paddingLeft="#dimen/baseline_grid_1x"
android:text="#string/label_fcebook"
android:textColor="#465892"
android:textSize="#dimen/baseline_grid_2x"
android:textStyle="normal"
/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</ScrollView>
ScrollView is working, please check below layout
Note : changed widgets, heights and paddings and have fixed height for RelativeLayout to check ScrollView
<ScrollView
android:id="#+id/scrollView1"
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"
android:weightSum="2">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="500dp"
android:paddingLeft="7dp"
android:paddingRight="7dp"
android:paddingTop="7dp">
<android.support.v4.view.ViewPager
android:id="#+id/pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/textView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<TextView
android:id="#+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/indicator"
android:fontFamily="sans-serif"
android:gravity="center_horizontal"
android:lineSpacingExtra="5dp"
android:paddingTop="5dp"
android:text="label_businesscard_title"
android:textColor="#3e4360"
android:textSize="5dp"
android:textStyle="normal" />
<android.support.v4.view.ViewPager
android:id="#+id/indicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:paddingTop="15dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="500dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="5dp">
<Button
android:id="#+id/btn_signin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="label_sign_in"
android:textColor="#ffffff" />
<Button
android:id="#+id/btn_signup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/btn_signin"
android:layout_marginTop="5dp"
android:text="label_sign_up"
android:textColor="#00becc" />
<TextView
android:id="#+id/oRtextLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/btn_signup"
android:layout_marginTop="7dp"
android:fontFamily="sans-serif"
android:gravity="center"
android:text="label_or"
android:textColor="#8998a7"
android:textSize="14sp"
android:textStyle="normal" />
<LinearLayout
android:id="#+id/linearlayout4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_below="#+id/oRtextLabel"
android:layout_marginTop="5dp"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="#drawable/ic_launcher_background" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-medium"
android:gravity="center_horizontal"
android:paddingLeft="5dp"
android:text="label_fcebook"
android:textColor="#465892"
android:textSize="16dp"
android:textStyle="normal" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</ScrollView>
Replace your xml with this one:
<RelativeLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:weightSum="2"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
xmlns:android="http://schemas.android.com/apk/res/android">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="2"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingLeft="#dimen/baseline_grid_7x"
android:paddingRight="#dimen/baseline_grid_7x"
android:paddingTop="#dimen/baseline_grid_7x">
<android.support.v4.view.ViewPager
android:id="#+id/pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/textView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
app:adapter="#{imageSlideradapter}"
app:currentItem="#{landingLoginViewModel.currentPage}"
android:addOnPageChangeListener="#{landingLoginViewModel.pageChangeListener}"/>
<TextView
android:id="#+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/indicator"
android:fontFamily="sans-serif"
android:gravity="center_horizontal"
android:lineSpacingExtra="#dimen/text_land_spacing"
android:paddingTop="#dimen/layout_padding_top"
android:text="#string/label_businesscard_title"
android:textColor="#3e4360"
android:textSize="#dimen/businees_card_textmessage_size"
android:textStyle="normal" />
<com.viewpagerindicator.CirclePageIndicator
android:id="#+id/indicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:paddingTop="#dimen/padding_top_15dp"
app:centered="true"
app:fillColor="#1ebad6"
app:radius="#{landingLoginViewModel.pagerIndicatorCircle}"
app:pageColor="#c6caca"
app:snap="false" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingLeft="#dimen/baseline_grid_2.5x"
android:paddingRight="#dimen/baseline_grid_2.5x"
android:paddingTop="#dimen/baseline_grid_5x">
<android.support.v7.widget.AppCompatButton
android:id="#+id/btn_signin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#drawable/buttonbackroudnd"
android:onClick="#{()->landingLoginViewModel.onSignIn()}"
android:text="#string/label_sign_in"
android:textColor="#ffffff" />
<android.support.v7.widget.AppCompatButton
android:id="#+id/btn_signup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/btn_signin"
android:layout_marginTop="#dimen/baseline_grid_3.5x"
android:background="#drawable/roundbuttonborder"
android:onClick="#{()->landingLoginViewModel.onSignUp()}"
android:text="#string/label_sign_up"
android:textColor="#00becc" />
<android.support.v7.widget.AppCompatTextView
android:id="#+id/oRtextLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/btn_signup"
android:layout_marginTop="#dimen/baseline_grid_5.5x"
android:fontFamily="sans-serif"
android:gravity="center"
android:text="#string/label_or"
android:textColor="#8998a7"
android:textSize="14sp"
android:textStyle="normal"
/>
<LinearLayout
android:id="#+id/linearlayout4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_below="#+id/oRtextLabel"
android:gravity="center"
android:onClick="#{()->landingLoginViewModel.onFacebook()}"
android:orientation="horizontal"
android:layout_marginTop="#dimen/baseline_grid_5x">
<ImageView
android:layout_width="#dimen/baseline_grid_3.5x"
android:layout_height="#dimen/baseline_grid_3.5x"
android:src="#drawable/fb_icon" />
<android.support.v7.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-medium"
android:gravity="center_horizontal"
android:paddingLeft="#dimen/baseline_grid_1x"
android:text="#string/label_fcebook"
android:textColor="#465892"
android:textSize="#dimen/baseline_grid_2x"
android:textStyle="normal"
/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</ScrollView>
I have ViewPager:-
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/white_color">
<include
android:id="#+id/includeLayout"
layout="#layout/toolbar_main_user_pic" />
<!-- <android.support.v4.widget.NestedScrollView
android:id="#+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_above="#+id/footer"
android:layout_below="#+id/includeLayout">
<android.support.design.widget.CoordinatorLayout
android:id="#+id/coordinator_layout"
android:layout_width="match_parent"
android:layout_height="#dimen/_180sdp">
<RelativeLayout
android:id="#+id/rr"
android:layout_width="match_parent"
android:layout_height="#dimen/_150sdp"
android:background="#000000">
<ImageView
android:id="#+id/img_bg"
android:layout_width="match_parent"
android:layout_height="#dimen/_150sdp"
android:alpha="0.6"
android:scaleType="centerCrop"
android:src="#drawable/car_img" />
<TextView
android:id="#+id/txt_name"
style="#style/Textview_red_11sp_bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="#dimen/_5sdp"
android:layout_marginLeft="#dimen/_100sdp"
android:text="#string/deafult_user_name"
android:textColor="#color/white_color" />
<Button
style="#style/ButtonBackground"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="#dimen/_10sdp"
android:layout_marginRight="#dimen/_10sdp"
android:minHeight="0dp"
android:padding="#dimen/_5sdp"
android:text="#string/partecipate" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="#dimen/_5sdp"
android:layout_marginLeft="#dimen/_90sdp"
android:orientation="horizontal"
android:weightSum="3">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<ImageView
android:layout_width="#dimen/_18sdp"
android:layout_height="#dimen/_18sdp"
android:src="#mipmap/web" />
<TextView
style="#style/Textview_darkgray_11sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="#dimen/_5sdp"
android:text="#string/public_text" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<ImageView
android:layout_width="#dimen/_18sdp"
android:layout_height="#dimen/_18sdp"
android:src="#mipmap/approved" />
<TextView
style="#style/Textview_darkgray_11sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="#dimen/_5sdp"
android:text="#string/approved"
android:textSize="#dimen/_10sdp" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/_5sdp"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="#dimen/_18sdp"
android:layout_height="#dimen/_18sdp"
android:src="#mipmap/shareimage" />
<TextView
style="#style/Textview_darkgray_11sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="#dimen/_5sdp"
android:text="#string/share" />
</LinearLayout>
</LinearLayout>
<de.hdodenhof.circleimageview.CircleImageView
android:id="#+id/user_icon"
android:layout_width="#dimen/_70sdp"
android:layout_height="#dimen/_70sdp"
android:layout_marginLeft="#dimen/_15sdp"
android:src="#mipmap/profile_default"
app:civ_border_color="#color/gray_background_color"
app:civ_border_overlay="true"
app:civ_border_width="#dimen/_5sdp"
app:layout_anchor="#+id/img_bg"
app:layout_anchorGravity="bottom" />
</android.support.design.widget.CoordinatorLayout>
<View
android:id="#+id/view"
android:layout_width="match_parent"
android:layout_height="#dimen/_2sdp"
android:background="#color/gray_background_color" />
<android.support.design.widget.TabLayout
android:id="#+id/tab_host"
style="#style/Tablayout_style" />
<android.support.v4.view.ViewPager
android:id="#+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="#string/appbar_scrolling_view_behavior" />
</LinearLayout>
<!-- </android.support.v4.widget.NestedScrollView>-->
<LinearLayout
android:id="#+id/footer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<include layout="#layout/bottom_menu_layout" />
</LinearLayout>
<!--</LinearLayout>-->
</RelativeLayout>
Here my viewpager fragment layout:-
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_10sdp"
android:background="#color/white_color"
android:orientation="vertical"
android:paddingLeft="#dimen/_10sdp"
android:layout_marginBottom="#dimen/_10sdp">
<!--<include
layout="#layout/community_fragment_event_moreinfo"></include>-->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/img_cal_icon"
android:layout_width="#dimen/_15sdp"
android:layout_height="#dimen/_15sdp"
android:src="#mipmap/timesmall" />
<TextView
android:id="#+id/txt_date"
style="#style/Textview_darkgray_11sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/_5sdp"
android:layout_toRightOf="#+id/img_cal_icon"
android:text="31 November - 02 December" />
<TextView
android:id="#+id/txt_date_details"
style="#style/Textview_gray_11sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/txt_date"
android:layout_marginLeft="#dimen/_5sdp"
android:layout_toRightOf="#+id/img_cal_icon"
android:text="#string/from_december_to_december" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_10sdp">
<ImageView
android:id="#+id/img_location_icon"
android:layout_width="#dimen/_15sdp"
android:layout_height="#dimen/_15sdp"
android:src="#mipmap/location" />
<TextView
android:id="#+id/txt_circuit"
style="#style/Textview_darkgray_11sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/_5sdp"
android:layout_toRightOf="#+id/img_location_icon"
android:text="#string/sepang_international_circuit" />
<TextView
android:id="#+id/txt_circuit_details"
style="#style/Textview_gray_11sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/txt_circuit"
android:layout_marginLeft="#dimen/_5sdp"
android:layout_toRightOf="#+id/img_location_icon"
android:text="#string/sepang_circuit_details" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_10sdp">
<ImageView
android:id="#+id/img_group_icon"
android:layout_width="#dimen/_15sdp"
android:layout_height="#dimen/_15sdp"
android:src="#drawable/group_gray" />
<TextView
android:id="#+id/txt_group"
style="#style/Textview_darkgray_11sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/_5sdp"
android:layout_toRightOf="#+id/img_group_icon"
android:text="#string/pilots" />
<TextView
android:id="#+id/txt_pilots_count"
style="#style/Textview_red_11sp_bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/_5sdp"
android:layout_toRightOf="#+id/txt_group"
android:text="231" />
<TextView
android:id="#+id/txt_dets"
style="#style/Textview_darkgray_11sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#+id/txt_pilots_count"
android:text="#string/dets" />
<TextView
android:id="#+id/txt_friends"
style="#style/Textview_darkgray_11sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#+id/txt_dets"
android:text="#string/friends_dets" />
<TextView
android:id="#+id/txt_friends_count"
style="#style/Textview_red_11sp_bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/_5sdp"
android:layout_toRightOf="#+id/txt_friends"
android:text="4" />
<TextView
android:id="#+id/txt_friends_out_of"
style="#style/Textview_darkgray_11sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#+id/txt_friends_count"
android:text="/231" />
<android.support.v7.widget.RecyclerView
android:id="#+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/txt_group"
android:layout_marginLeft="#dimen/_5sdp"
android:layout_marginTop="#dimen/_5sdp"
android:layout_toRightOf="#+id/img_group_icon" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_10sdp">
<ImageView
android:id="#+id/img_organized_icon"
android:layout_width="#dimen/_15sdp"
android:layout_height="#dimen/_15sdp"
android:src="#mipmap/organized" />
<TextView
android:id="#+id/txt_organized"
style="#style/Textview_darkgray_11sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/_5sdp"
android:layout_toRightOf="#+id/img_organized_icon"
android:text="#string/organized_by" />
<TextView
android:id="#+id/txt_car_name"
style="#style/Textview_red_11sp_bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/txt_organized"
android:layout_marginLeft="#dimen/_5sdp"
android:layout_toRightOf="#+id/img_organized_icon"
android:text="#string/lambnorghini" />
<TextView
android:id="#+id/txt_club_name"
style="#style/Textview_gray_11sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/txt_car_name"
android:layout_marginLeft="#dimen/_5sdp"
android:layout_toRightOf="#+id/img_organized_icon"
android:text="#string/officials_valentino_rossis_club" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/rr_dollor_amt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_10sdp">
<ImageView
android:id="#+id/img_dollor_icon"
android:layout_width="#dimen/_15sdp"
android:layout_height="#dimen/_15sdp"
android:src="#mipmap/price" />
<TextView
style="#style/Textview_darkgray_11sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="#dimen/_5sdp"
android:layout_toRightOf="#+id/img_dollor_icon"
android:text="#string/dollor_amt" />
</RelativeLayout>
<View
android:id="#+id/view"
android:layout_width="match_parent"
android:layout_height="#dimen/_2sdp"
android:layout_marginTop="#dimen/_5sdp"
android:background="#color/gray_background_color" />
<TextView
style="#style/Textview_darkgray_11sp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_10sdp"
android:text="#string/details" />
<TextView
style="#style/Textview_gray_11sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/lorem_ipsum" />
<!-- <LinearLayout
android:id="#+id/add_post_info_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_10sdp"
android:background="#color/gray_background_color"
android:orientation="horizontal">
<de.hdodenhof.circleimageview.CircleImageView
android:id="#+id/user_profile_img"
android:layout_width="#dimen/_50sdp"
android:layout_height="#dimen/_50sdp"
android:src="#mipmap/profile_default" />
<EditText
android:id="#+id/post_edittext"
style="#style/Textview_gray_11sp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/_10sdp"
android:gravity="top|left"
android:hint="#string/whats_happening_right"
android:lines="3" />
</LinearLayout>
<RelativeLayout
android:id="#+id/add_post_ll"
android:layout_width="match_parent"
android:layout_height="#dimen/_30sdp"
android:layout_below="#+id/add_post_info_ll"
android:background="#color/white_color"
android:gravity="center|left"
android:layout_marginBottom="#dimen/_10sdp"
android:padding="#dimen/_5sdp">
<ImageView
android:id="#+id/flag_icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:padding="#dimen/_5sdp"
android:src="#mipmap/flag" />
<ImageView
android:id="#+id/car_icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/flag_icon"
android:padding="#dimen/_5sdp"
android:src="#mipmap/car" />
<ImageView
android:id="#+id/trophy_icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/car_icon"
android:padding="#dimen/_5sdp"
android:src="#mipmap/trophy" />
<ImageView
android:id="#+id/timer_icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/trophy_icon"
android:padding="#dimen/_5sdp"
android:src="#mipmap/timer" />
<ImageView
android:id="#+id/sun_icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/timer_icon"
android:padding="#dimen/_5sdp"
android:src="#mipmap/sun" />
<ImageView
android:id="#+id/gallery_icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/sun_icon"
android:padding="#dimen/_5sdp"
android:src="#mipmap/gallery" />
<ImageView
android:id="#+id/smiley_icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/gallery_icon"
android:padding="#dimen/_5sdp"
android:src="#mipmap/amiley" />
<TextView
android:id="#+id/post_tv"
style="#style/Textview_white_11sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="#dimen/_10sdp"
android:background="#drawable/button_back"
android:paddingBottom="#dimen/_3sdp"
android:paddingLeft="#dimen/_10sdp"
android:paddingRight="#dimen/_10sdp"
android:paddingTop="#dimen/_3sdp"
android:text="#string/post" />
</RelativeLayout>-->
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</LinearLayout>
[![][1]][1]
I want to scroll header as well when viewpager content scrolls.I tried using Nested ScrollView on both screens but didn't get any success.Can anyone help me solve this problem.Thanks in advance.
I have RecyclerView and LinearLayout in CoordinatorLayout. For RecyclerView scroll is working fine but i want above content to scroll in the screen. Please guide what changes i need to do or anything im doing wrong please guide me.
my activity_article_polls.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
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"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
tools:context="in.passionconnect.application.ArticlePolls">
<android.support.v7.widget.RecyclerView
android:id="#+id/landing_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="440dp"
android:clipToPadding="false"
app:layout_behavior="#string/appbar_scrolling_view_behavior" />
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="#style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="#style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<include layout="#layout/content_article_polls" />
</android.support.design.widget.CoordinatorLayout>
and my content_article_polls.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView
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:fillViewport="true"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
tools:context="in.passionconnect.application.ArticlePolls"
tools:showIn="#layout/activity_article_polls">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/landing_list"
android:orientation="vertical"
app:layout_scrollFlags="scroll|enterAlways">
<LinearLayout
android:id="#+id/layout_filters"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="#color/colorPrimary"
android:gravity="center"
android:orientation="horizontal"
android:visibility="visible"
android:weightSum="3">
<CheckBox
android:id="#+id/chk_date"
style="#style/roboregular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:buttonTint="#ffffff"
android:text="Newest"
android:textColor="#color/white" />
<CheckBox
android:id="#+id/chk_random"
style="#style/roboregular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:buttonTint="#ffffff"
android:text="Random"
android:textColor="#color/white" />
<CheckBox
android:id="#+id/chk_popular"
style="#style/roboregular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:buttonTint="#ffffff"
android:text="Popularity"
android:textColor="#color/white" />
</LinearLayout>
<LinearLayout
android:id="#+id/card_summary_read_more_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="visible">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/card_background_gradient_overlay"
android:layout_width="match_parent"
android:layout_height="#dimen/landing_card_imageview_height"
android:adjustViewBounds="true"
android:background="#drawable/card_gradient_overlay"
android:scaleType="centerCrop" />
<TextView
android:id="#+id/article_poll_title"
style="#style/robobold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_gravity="left|bottom"
android:padding="10dp"
android:text="Top 3 Highest Grossing Hollywood Movies"
android:textColor="#color/white"
android:textSize="14sp" />
</FrameLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="10dp">
<in.passionconnect.application.view.RoundedImageView
android:id="#+id/card_author_icon"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:padding="12dp"
android:scaleType="centerCrop"
android:src="#drawable/lion" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="10dp">
<TextView
android:id="#+id/article_author"
style="#style/robobold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="8"
android:text="Prasanth"
android:textColor="#color/dark_gray"
android:textSize="15sp" />
<TextView
android:id="#+id/article_author_desn"
style="#style/roboregular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="developer at varchas technologies"
android:textColor="#color/dark_gray"
android:textSize="12sp" />
<TextView
android:id="#+id/article_date"
style="#style/roboregular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="12th March 2016 06:09:06 PM"
android:textColor="#color/dark_gray"
android:textSize="12sp" />
</LinearLayout>
<TextView
android:id="#+id/article_author_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/dark_gray"
android:visibility="invisible" />
<TextView
android:id="#+id/article_title_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/dark_gray"
android:visibility="invisible" />
</LinearLayout>
<TextView
android:id="#+id/txt_follow"
style="#style/robobold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_gravity="center"
android:layout_marginRight="10dp"
android:background="#drawable/follow_border"
android:padding="10dp"
android:text="Follow"
android:textColor="#b7492b"
android:textSize="15sp" />
<TextView
android:id="#+id/txt_unfollow"
style="#style/robobold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_gravity="center"
android:background="#drawable/follow_border"
android:padding="10dp"
android:text="Following"
android:textColor="#b7492b"
android:textSize="15sp"
android:visibility="gone" />
</RelativeLayout>
<TextView
android:id="#+id/card_summary"
style="#style/roboregular"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:lineSpacingExtra="2.5dp"
android:padding="10dp"
android:text="#string/card_summary"
android:textColor="#color/dark_gray"
android:textSize="16sp"
android:visibility="visible" />
</LinearLayout>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="#+id/landing_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
app:layout_behavior="#string/appbar_scrolling_view_behavior" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
I have tried like also, only my recyclerview scroll. I want scroll the whole screen along with the recyclerview.
Thanks in Advance
Atlast i tried and fixed the scrolling problem. I have referred This link
Just setting the height to my Recyclerview android:minHeight="840dp"
content_article_polls.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView
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:fillViewport="true"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
tools:context="in.passionconnect.application.ArticlePolls"
tools:showIn="#layout/activity_article_polls">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/landing_list"
android:orientation="vertical"
app:layout_scrollFlags="scroll|enterAlways">
<LinearLayout
android:id="#+id/layout_filters"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="#color/colorPrimary"
android:gravity="center"
android:orientation="horizontal"
android:visibility="visible"
android:weightSum="3">
<CheckBox
android:id="#+id/chk_date"
style="#style/roboregular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:buttonTint="#ffffff"
android:text="Newest"
android:textColor="#color/white" />
<CheckBox
android:id="#+id/chk_random"
style="#style/roboregular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:buttonTint="#ffffff"
android:text="Random"
android:textColor="#color/white" />
<CheckBox
android:id="#+id/chk_popular"
style="#style/roboregular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:buttonTint="#ffffff"
android:text="Popularity"
android:textColor="#color/white" />
</LinearLayout>
<LinearLayout
android:id="#+id/card_summary_read_more_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="visible">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/card_background_gradient_overlay"
android:layout_width="match_parent"
android:layout_height="#dimen/landing_card_imageview_height"
android:adjustViewBounds="true"
android:background="#drawable/card_gradient_overlay"
android:scaleType="centerCrop" />
<TextView
android:id="#+id/article_poll_title"
style="#style/robobold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_gravity="left|bottom"
android:padding="10dp"
android:text="Top 3 Highest Grossing Hollywood Movies"
android:textColor="#color/white"
android:textSize="14sp" />
</FrameLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="10dp">
<in.passionconnect.application.view.RoundedImageView
android:id="#+id/card_author_icon"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:padding="12dp"
android:scaleType="centerCrop"
android:src="#drawable/lion" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="10dp">
<TextView
android:id="#+id/article_author"
style="#style/robobold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="8"
android:text="Prasanth"
android:textColor="#color/dark_gray"
android:textSize="15sp" />
<TextView
android:id="#+id/article_author_desn"
style="#style/roboregular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="developer at varchas technologies"
android:textColor="#color/dark_gray"
android:textSize="12sp" />
<TextView
android:id="#+id/article_date"
style="#style/roboregular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="12th March 2016 06:09:06 PM"
android:textColor="#color/dark_gray"
android:textSize="12sp" />
</LinearLayout>
<TextView
android:id="#+id/article_author_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/dark_gray"
android:visibility="invisible" />
<TextView
android:id="#+id/article_title_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/dark_gray"
android:visibility="invisible" />
</LinearLayout>
<TextView
android:id="#+id/txt_follow"
style="#style/robobold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_gravity="center"
android:layout_marginRight="10dp"
android:background="#drawable/follow_border"
android:padding="10dp"
android:text="Follow"
android:textColor="#b7492b"
android:textSize="15sp" />
<TextView
android:id="#+id/txt_unfollow"
style="#style/robobold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_gravity="center"
android:background="#drawable/follow_border"
android:padding="10dp"
android:text="Following"
android:textColor="#b7492b"
android:textSize="15sp"
android:visibility="gone" />
</RelativeLayout>
<TextView
android:id="#+id/card_summary"
style="#style/roboregular"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:lineSpacingExtra="2.5dp"
android:padding="10dp"
android:text="#string/card_summary"
android:textColor="#color/dark_gray"
android:textSize="16sp"
android:visibility="visible" />
</LinearLayout>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="#+id/landing_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:minHeight="840dp"
app:layout_behavior="#string/appbar_scrolling_view_behavior" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
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"
tools:context="in.passionconnect.application.ArticlePolls">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="#style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="#style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<include layout="#layout/content_article_polls" />
</android.support.design.widget.CoordinatorLayout>
And your other layout to be included should look as below:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView 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"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
tools:context="in.passionconnect.application.ArticlePolls"
tools:showIn="#layout/activity_scrolling">
<RelativeLayout android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="#+id/landing_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="440dp"
android:clipToPadding="false"/>
<LinearLayout
android:layout_below="#+id/landing_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_scrollFlags="scroll|enterAlways">
<LinearLayout
android:id="#+id/layout_filters"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="#color/colorPrimary"
android:gravity="center"
android:orientation="horizontal"
android:visibility="visible"
android:weightSum="3">
<CheckBox
android:id="#+id/chk_date"
style="#style/roboregular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:buttonTint="#ffffff"
android:text="Newest"
android:textColor="#color/white" />
<CheckBox
android:id="#+id/chk_random"
style="#style/roboregular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:buttonTint="#ffffff"
android:text="Random"
android:textColor="#color/white" />
<CheckBox
android:id="#+id/chk_popular"
style="#style/roboregular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:buttonTint="#ffffff"
android:text="Popularity"
android:textColor="#color/white" />
</LinearLayout>
<LinearLayout
android:id="#+id/card_summary_read_more_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="visible">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/card_background_gradient_overlay"
android:layout_width="match_parent"
android:layout_height="#dimen/landing_card_imageview_height"
android:adjustViewBounds="true"
android:background="#drawable/card_gradient_overlay"
android:scaleType="centerCrop" />
<TextView
android:id="#+id/article_poll_title"
style="#style/robobold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_gravity="left|bottom"
android:padding="10dp"
android:text="Top 3 Highest Grossing Hollywood Movies"
android:textColor="#color/white"
android:textSize="14sp" />
</FrameLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="10dp">
<in.passionconnect.application.view.RoundedImageView
android:id="#+id/card_author_icon"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:padding="12dp"
android:scaleType="centerCrop"
android:src="#drawable/lion" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="10dp">
<TextView
android:id="#+id/article_author"
style="#style/robobold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="8"
android:text="Author name"
android:textColor="#color/dark_gray"
android:textSize="15sp" />
<TextView
android:id="#+id/article_author_desn"
style="#style/roboregular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="author"
android:textColor="#color/dark_gray"
android:textSize="12sp" />
<TextView
android:id="#+id/article_date"
style="#style/roboregular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="12th March 2016 06:09:06 PM"
android:textColor="#color/dark_gray"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="#+id/txt_follow"
style="#style/robobold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_gravity="center"
android:layout_marginRight="10dp"
android:background="#drawable/follow_border"
android:padding="10dp"
android:text="Follow"
android:textColor="#b7492b"
android:textSize="15sp" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</android.support.v4.widget.NestedScrollView>