ScrollView is not working in Linearlayout in android - android

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>

Related

Last item in layout not appear

I am working on android app
and i have cart activity which have multi row of products
and then the total of cart and button to continue..
This layout have top and buttom bars and then Scrollview have linearLayout as child...
This child contain:
Recyclerview
Textboxes
Button
My problem is: I cant scroll to the last item in my layout (The Button) .
This is my xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:layout_alignParentTop="true">
<ImageView
android:id="#+id/ProgressBar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitCenter"
android:src="#drawable/progress_rec"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="#+id/overview_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="#drawable/backgroudn"/>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="#+id/tt"
>
<LinearLayout
android:layout_width = "match_parent"
android:layout_height = "70dp"
android:elevation="12dp"
android:padding="8dp"
android:background="#drawable/white_action_bar"
android:id="#+id/first"
android:orientation="horizontal"
android:weightSum="1">
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:elevation="12dp"
android:id="#+id/btnActionBar11"
android:drawableStart="#drawable/ic_arrow_back_black_24dp"
android:drawableLeft="#drawable/ic_arrow_back_black_24dp"
android:drawablePadding="8dp"
android:drawableTint="#color/colorPrimaryDark"
android:padding="8dp"
android:background="#android:color/transparent"
android:layout_weight="0.2" />
<TextView
android:layout_width = "0dp"
android:layout_height = "wrap_content"
android:gravity="center"
android:textSize="14sp"
android:padding="8dp"
android:text="#string/cart"
android:layout_marginTop="8dp"
android:id="#+id/tvActionBar"
android:textColor="#color/colorPrimaryDark"
android:layout_weight="0.5"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:id="#+id/btnActionBarEnd11"
android:padding="8dp"
android:drawableEnd="#drawable/ic_shopping_cart_black_24dp"
android:drawableRight="#drawable/ic_shopping_cart_black_24dp"
android:drawablePadding="8dp"
android:drawableTint="#color/colorPrimaryDark"
android:textColor="#color/colorPrimaryDark"
android:background="#android:color/transparent"
android:layout_weight="0.3"
android:textSize="12sp"
android:visibility="gone"/>
</LinearLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
android:layout_below="#+id/first">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/no_data"
android:text="#string/no_data"
android:textSize="24sp"
android:textAlignment="center"
android:gravity="center"
android:textColor="#color/colorPrimary"
android:visibility="gone"/>
<ProgressBar
android:foregroundGravity="center"
android:id="#+id/progress"
android:layout_below="#+id/no_data"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="#android:color/transparent"
android:layout_gravity="center"
android:visibility="gone" />
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/cartContentList"
android:layoutAnimation="#anim/layout_animation"
app:layout_behavior="#string/appbar_scrolling_view_behavior"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp"
android:weightSum="1"
android:id="#+id/totalLayout">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="1"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.3"
android:text="#string/total"
android:textSize="#dimen/medium"
android:textColor="#color/colorPrimaryDark"
android:gravity="center"
/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:text="#string/zero_dollar"
android:textSize="#dimen/medium"
android:textColor="#color/colorPrimaryDark"
android:gravity="center"
android:id="#+id/tvTotal"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="#drawable/round_button"
android:text="#string/continue_"
android:textColor="#color/white"
android:textSize="#dimen/medium"
android:layout_margin="8dp"
android:padding="8dp"
android:gravity="center"
android:id="#+id/btnContinue" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="8dp"
android:paddingTop="8dp"
android:id="#+id/any"
android:background="#drawable/white_menu_bar"
android:layout_alignParentBottom="true"
android:elevation="24dp">
<LinearLayout
android:layout_width = "match_parent"
android:layout_height = "40dp"
android:elevation="12dp"
android:padding="2dp"
android:id="#+id/end"
android:orientation="horizontal"
android:weightSum="1"
android:gravity="center_horizontal">
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.25"
android:background="#android:color/transparent"
android:drawableTop="#drawable/home_1"
android:layout_margin="8dp"
android:gravity="center"
android:layout_gravity="center"
android:textColor="#color/colorPrimaryDark"
android:paddingEnd="15dp"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.25"
android:background="#android:color/transparent"
android:textColor="#color/colorPrimaryDark"
android:gravity="center"
android:layout_gravity="center"
android:id="#+id/btnMyOrder"
android:drawableTop="#drawable/my_orders_1"
android:layout_margin="8dp"
android:paddingEnd="15dp"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.25"
android:background="#android:color/transparent"
android:textColor="#color/colorPrimaryDark"
android:gravity="center"
android:layout_gravity="center"
android:drawableTop="#drawable/notifications_1"
android:layout_margin="8dp"
android:paddingEnd="18dp"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.25"
android:background="#android:color/transparent"
android:drawableTop="#drawable/side_menu_1"
android:layout_marginTop="8dp"
android:drawableTint="#color/colorPrimaryDark"
android:layout_gravity="center"
android:paddingEnd="15dp"/>
</LinearLayout>
<LinearLayout
android:layout_width = "match_parent"
android:layout_height = "20dp"
android:elevation="12dp"
android:id="#+id/end1"
android:orientation="horizontal"
android:weightSum="1"
android:gravity="center_horizontal">
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:id="#+id/gr1Home1"
android:drawableTop="#drawable/component1"
android:background="#android:color/transparent"
android:layout_weight="0.25"
android:paddingTop="8dp"
android:drawablePadding="15dp"
android:visibility="visible"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:id="#+id/gr2Notification1"
android:drawableTop="#drawable/component1"
android:background="#android:color/transparent"
android:layout_weight="0.25"
android:padding="8dp"
android:drawablePadding="15dp"
android:visibility="invisible"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:id="#+id/gr3Message1"
android:drawableTop="#drawable/component1"
android:background="#android:color/transparent"
android:layout_weight="0.25"
android:padding="8dp"
android:drawablePadding="15dp"
android:visibility="invisible"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:id="#+id/gr4Calender1"
android:drawableTop="#drawable/component1"
android:background="#android:color/transparent"
android:layout_weight="0.25"
android:padding="8dp"
android:drawablePadding="15dp"
android:visibility="invisible"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
.
This is my Cart Activity XMl:
<?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="match_parent"
android:background="#color/cart_bg"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/cart_bg"
android:orientation="vertical">
<include
android:id="#+id/abl_main1"
layout="#layout/app_header_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="#string/appbar_scrolling_view_behavior" />
<LinearLayout
android:id="#+id/ll_item_count"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/abl_main1"
android:orientation="horizontal">
<TextView
android:id="#+id/tv_item_count_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="#font/montserrat"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingRight="5dp"
android:paddingBottom="10dp"
android:text="#string/my_cart"
android:textColor="#color/text_item"
android:textSize="#dimen/text_size_18"
android:textStyle="bold" />
<TextView
android:id="#+id/tv_item_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="#font/montserrat"
android:paddingLeft="0dp"
android:paddingTop="10dp"
android:paddingRight="5dp"
android:paddingBottom="10dp"
android:text="#string/my_cart"
android:textColor="#color/gray_9E"
android:textSize="#dimen/text_size_12"
android:textStyle="normal" />
<TextView
android:id="#+id/tv_total"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:fontFamily="#font/montserrat"
android:gravity="right"
android:padding="10dp"
android:text="#string/total_caps"
android:textColor="#color/text_item"
android:textStyle="bold"
android:visibility="gone" />
</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="#+id/ll_item_count">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="60dp"
android:visibility="visible">
<LinearLayout
android:id="#+id/ll_listing"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:visibility="visible">
<androidx.recyclerview.widget.RecyclerView
android:id="#+id/rcv_cart"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="5dp"
android:background="#android:color/transparent"
android:clipToPadding="false"
android:orientation="vertical"
android:visibility="visible"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<androidx.cardview.widget.CardView
style="#style/CardView.Light"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="#color/white"
app:cardCornerRadius="4dp">
<LinearLayout
android:id="#+id/ll_playable"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="5dp"
android:visibility="gone">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:text="#string/cart_total"
android:textColor="#color/text_item"
android:textStyle="normal" />
<TextView
android:id="#+id/tv_cart_total"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:gravity="right"
android:text=""
android:textColor="#color/text_item"
android:textStyle="normal" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="5dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:text="#string/total"
android:textColor="#color/text_item"
android:textStyle="bold" />
<TextView
android:id="#+id/tv_sub_total"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:gravity="right"
android:text=""
android:textColor="#color/text_item"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="5dp"
android:visibility="gone">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:text="#string/discount"
android:textColor="#color/text_item"
android:textStyle="normal" />
<TextView
android:id="#+id/tv_discount"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:gravity="right"
android:text=""
android:textColor="#color/text_item"
android:textStyle="normal" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="5dp"
android:visibility="gone">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:text="#string/dilivery"
android:textColor="#color/text_item"
android:textStyle="normal" />
<TextView
android:id="#+id/tv_delivery"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:gravity="right"
android:text=""
android:textColor="#color/text_item"
android:textStyle="normal" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="5dp"
android:visibility="gone">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:text="#string/total_payable"
android:textColor="#color/text_item"
android:textStyle="bold" />
<TextView
android:id="#+id/tv_total_payable"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:gravity="right"
android:text=""
android:textColor="#color/text_item"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="5dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/montserrat"
android:maxLines="2"
android:text="#string/tax_and_shipping_calculated"
android:textColor="#color/text_item"
android:textSize="#dimen/text_size_15"
android:textStyle="normal" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="vertical"
android:paddingTop="10dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/margin5dp"
android:fontFamily="#font/montserrat"
android:text="#string/add_order_note"
android:textColor="#color/text_item" />
<EditText
android:id="#+id/ed_order_note"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#drawable/shape_rectangle_transperant_bg_app_color_border"
android:focusable="true"
android:focusableInTouchMode="true"
android:gravity="top|left"
android:hint="#string/how_can_we_help_you"
android:imeOptions="actionDone"
android:isScrollContainer="false"
android:lines="3"
android:maxLines="3"
android:overScrollMode="always"
android:padding="#dimen/margin5dp"
android:scrollbarStyle="insideInset"
android:scrollbars="vertical"
android:textColor="#color/text_item" />
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</RelativeLayout>
</ScrollView>
<RelativeLayout
android:id="#+id/rr_empty_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="#+id/ll_item_count"
android:layout_centerInParent="true"
android:background="#color/white"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:gravity="center_vertical"
android:orientation="vertical">
<LinearLayout
android:id="#+id/ll_backgorund_circle_cart"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_horizontal"
android:background="#drawable/circle_drawable"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="#+id/iv_background_icon_cart"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:src="#mipmap/iv_red_heart"
android:visibility="visible" />
</LinearLayout>
<TextView
android:id="#+id/tv_empty_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/padding_10"
android:layout_marginTop="#dimen/text_size_20"
android:layout_marginRight="#dimen/padding_10"
android:fontFamily="#font/montserrat"
android:gravity="center"
android:text="#string/your_bag_is_empty"
android:textColor="#color/text_item"
android:textSize="20dp"
android:textStyle="bold"
android:visibility="visible" />
<TextView
android:id="#+id/tv_empty_sub_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/padding_10"
android:layout_marginTop="#dimen/padding_10"
android:layout_marginRight="#dimen/padding_10"
android:layout_marginBottom="30dp"
android:fontFamily="#font/montserrat"
android:gravity="center"
android:text="#string/item_added_to_bag"
android:textColor="#color/gray_9E"
android:textSize="16dp"
android:textStyle="normal"
android:visibility="visible" />
<LinearLayout
android:id="#+id/ll_shopping_now"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="#drawable/shape_rectangle_transperant_bg_app_color_border_new"
android:gravity="center"
android:orientation="vertical"
android:paddingLeft="20dp"
android:paddingRight="20dp">
<TextView
android:id="#+id/tv_shopping_now"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/input_layout_password"
android:layout_alignParentStart="true"
android:layout_gravity="center_horizontal"
android:fontFamily="#font/montserrat"
android:gravity="center"
android:padding="#dimen/padding_10"
android:text="#string/shopping_now"
android:textColor="#color/black"
android:textSize="16dp" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<View
android:id="#+id/v_order_place"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_above="#+id/ll_place_order"
android:background="#color/light_gray" />
<LinearLayout
android:id="#+id/ll_place_order"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#color/white"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight=".5"
android:gravity="center"
android:orientation="vertical"
android:padding="5dp">
<TextView
android:id="#+id/tv_place_order_total"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fontFamily="#font/montserrat"
android:gravity="center"
android:text=""
android:textColor="#color/text_item"
android:textStyle="bold" />
</LinearLayout>
<com.wpa3.productshopify.util.RippleView
rv_centered="true"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
app:rv_type="rectangle"
app:rv_zoom="true">
<TextView
android:id="#+id/tv_place_order"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="5dp"
android:layout_weight=".5"
android:background="#drawable/shape_round_corner_rectangle"
android:fontFamily="#font/montserrat"
android:gravity="center"
android:padding="10dp"
android:text="#string/place_order"
android:textAllCaps="true"
android:textColor="#color/white"
android:textSize="15sp" />
</com.wpa3.productshopify.util.RippleView>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
Right now i'm busy so did not seen your XML but check my code snippet.
Hope this may help you

How to set all view with inside Relatvie layout in android

<LinearLayout 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: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>
This is my Xml i have divided full Screen in two part one for with each weight 1 and 1 for first Part every thing is comming correct but for second part i am trying to display lot of Control but last item goes to down while i want to fit all control please look my screen .look my current Screen last item goes down not visibile in small size Screen while in bigger its show ing please suggest me where am doing wrong.
The RelativeLayouts inside the LinearLayout should have a height of 0dp if you are using weights.
Setting them to wrap_content doesn't garantee that the content will be out of bounds of the visible screen.
Change your RelativeLayout height to 0dp and try.
Use this xml:
<LinearLayout 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:orientation="vertical"
android:weightSum="2"
app:layout_behavior="#string/appbar_scrolling_view_behavior">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
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="0dp"
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>

RecycleView using view holder able to scroll inside

I have my container.xml :
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="#id/toolbar"
android:id="#+id/techScrolView"
>
<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:orientation="horizontal"
android:layout_marginTop="15dp"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:layout_marginLeft="30dp">
<FrameLayout
android:id="#+id/photo_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp">
<de.hdodenhof.circleimageview.CircleImageView
android:id="#+id/profileDisplayImg"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:background="#drawable/circle"
android:gravity="center"
android:text="#string/hint_image"
android:textSize="#dimen/hint_size"
/>
</RelativeLayout>
</FrameLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="#string/edit_detail"
android:textColor="#color/white"
android:drawableLeft="#drawable/pencil"
android:id="#+id/edit_profile"
/>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center"
android:id="#+id/profileName"
android:textColor="#color/white"
android:textSize="#dimen/profile_text_size"
android:padding="2dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_horizontal"
android:id="#+id/profilePlace"
android:padding="2dp"
android:textColor="#color/white"
android:textSize="#dimen/profile_text_size"
android:drawableRight="#drawable/map_marker_white"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="#color/white"
android:layout_marginRight="20dp"
android:layout_marginLeft="20dp"
android:padding="6dp"
android:layout_marginTop="10dp"
android:baselineAligned="false"
android:layoutDirection="rtl"
>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/social_media_circle"
android:layout_marginRight="30dp"
android:layout_marginLeft="30dp"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/google_plus"
android:id="#+id/profileGoogle"
android:layout_marginRight="5dp"
android:layout_centerVertical="true"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/social_media_circle"
android:layout_marginRight="30dp"
android:layout_marginLeft="30dp"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/facebook"
android:id="#+id/profileFace"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/social_media_circle"
android:layout_marginRight="30dp"
android:layout_marginLeft="30dp"
android:layout_gravity="left"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/white_phone"
android:id="#+id/profileCall"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
/>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="40dp"
android:layout_marginRight="20dp"
android:layout_marginTop="15dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layoutDirection="rtl">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/career"
android:textColor="#color/white"
android:textSize="#dimen/profile_text_size"
android:layout_gravity="center"
android:gravity="right"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/text_display_color"
android:textSize="#dimen/profile_info_text_size"
android:text=""
android:padding="3dp"
android:layout_gravity="center|left"
android:gravity="left"
android:layout_marginRight="80dp"
android:id="#+id/profileSkills"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layoutDirection="rtl"
android:layout_marginTop="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/years_experince"
android:textColor="#color/white"
android:textSize="#dimen/profile_text_size"
android:layout_gravity="center"
android:gravity="right"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/text_display_color"
android:layout_gravity="center"
android:gravity="left"
android:layout_marginRight="18dp"
android:textSize="#dimen/profile_info_text_size"
android:text=""
android:padding="5dp"
android:id="#+id/profileExperince"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layoutDirection="rtl"
android:layout_marginTop="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/current_salary"
android:textColor="#color/white"
android:textSize="#dimen/profile_text_size"
android:layout_gravity="center"
android:gravity="right"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/text_display_color"
android:layout_gravity="center"
android:gravity="left"
android:layout_marginRight="48dp"
android:textSize="#dimen/profile_info_text_size"
android:text=""
android:padding="5dp"
android:id="#+id/profileSalary"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layoutDirection="rtl"
android:layout_marginTop="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/kafeel_type"
android:textColor="#color/white"
android:textSize="#dimen/profile_text_size"
android:layout_gravity="center"
android:gravity="right"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/text_display_color"
android:layout_gravity="center"
android:gravity="left"
android:layout_marginRight="45dp"
android:textSize="#dimen/profile_info_text_size"
android:text=""
android:padding="5dp"
android:id="#+id/profileKafeel"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layoutDirection="rtl"
android:layout_marginTop="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/nationalty"
android:textColor="#color/white"
android:textSize="#dimen/profile_text_size"
android:layout_gravity="center"
android:gravity="right"
/>
<TextView
android:id="#+id/profileNationalty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginRight="78dp"
android:textColor="#color/text_display_color"
android:gravity="left"
android:padding="5dp"
android:text=""
android:textSize="#dimen/profile_info_text_size" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layoutDirection="rtl"
android:layout_marginTop="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/statuse"
android:textColor="#color/white"
android:textSize="#dimen/profile_text_size"
android:layout_gravity="center"
android:gravity="right"
/>
<TextView
android:id="#+id/profileStatue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginRight="90dp"
android:gravity="left"
android:padding="5dp"
android:text=""
android:textColor="#color/text_display_color"
android:textSize="#dimen/profile_info_text_size" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layoutDirection="rtl"
android:layout_marginTop="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/drive"
android:textColor="#color/white"
android:textSize="#dimen/profile_text_size"
android:layout_gravity="center"
android:gravity="right"
/>
<TextView
android:id="#+id/profileDriveStatue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginRight="45dp"
android:gravity="left"
android:padding="5dp"
android:text=""
android:textColor="#color/text_display_color"
android:textSize="#dimen/profile_info_text_size" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layoutDirection="rtl"
android:layout_marginTop="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/age"
android:textColor="#color/white"
android:textSize="#dimen/profile_text_size"
android:layout_gravity="center"
android:gravity="right"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/text_display_color"
android:layout_gravity="center"
android:gravity="left"
android:layout_marginRight="96dp"
android:textSize="#dimen/profile_info_text_size"
android:text=""
android:padding="5dp"
android:id="#+id/profileAge"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
and i displayed it inside my recycleView :
`<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.widget.SwipeRefreshLayout
android:id="#+id/swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="#+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:scrollbarStyle="outsideOverlay"
android:paddingBottom="28dp" />
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>`
i displayed this content by depend on viewHolder and it;s worked fine
but i can't scroll inside the recycleView..
how i can scroll inside it ?
is that possibole?
If remove NestedScrollView from your container.xml is no working , may be add it to your recyclerView layout , here is my project if i want to scroll inside the recyclerView:
<android.support.v4.widget.NestedScrollView
android:layout_marginTop="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.github.mikephil.charting.charts.LineChart
android:id="#+id/lineChartDiastolic"
android:layout_width="match_parent"
android:layout_height="250dp"></com.github.mikephil.charting.charts.LineChart>
<TextView
android:id="#+id/lineChartSystolicTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="#string/systolic"
android:textColor="#android:color/black"
android:textSize="20dp" />
<com.github.mikephil.charting.charts.LineChart
android:id="#+id/lineChartSystolic"
android:layout_width="match_parent"
android:layout_height="250dp"></com.github.mikephil.charting.charts.LineChart>
<android.support.v7.widget.RecyclerView
android:id="#+id/recyclerForDataReportBloodPressure"
android:layout_width="match_parent"
android:layout_height="350dp"></android.support.v7.widget.RecyclerView>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
In your case , remove NestedScrollView on container.xml , add it on recyclerView layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v4.widget.SwipeRefreshLayout
android:id="#+id/swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="#+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:scrollbarStyle="outsideOverlay"
android:paddingBottom="28dp" />
</android.support.v4.widget.SwipeRefreshLayout>
</android.support.v4.widget.NestedScrollView>
</LinearLayout>

Android WebView Rendering Issue after Android System Webview Update

I am facing Webview Rendering issue on Android devices after Android System WebView Update. Webview is rendering outside the screen. For more information, please check screenshot.
Does anyone have a same issue?
Any help will be appreciated.Thanks in advance.
Please see the xml file as asked:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
android:id="#+id/toolbar"
layout="#layout/toolbar" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/fragment_back_color">
<ScrollView
android:id="#+id/offerDetailScrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:layout_above="#+id/installTextView">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp">
<android.support.v7.widget.CardView
android:id="#+id/card_offer"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="#+id/topViewDealDisplay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/white"
android:gravity="center"
android:orientation="vertical"
android:paddingBottom="10dp"
android:paddingTop="10dp">
<ImageView
android:id="#+id/dealImageView"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_centerInParent="true"
android:layout_margin="5dp"></ImageView>
<com.spiceladdoo.views.LatoRegularTextView
android:id="#+id/dealNameTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="4dp"
android:text=""
android:textColor="#color/text_color"
android:textSize="18sp" />
<com.spiceladdoo.views.LatoRegularTextView
android:id="#+id/offerTitleTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="4dp"
android:text="deal titile"
android:textColor="#color/lower_text_color"
android:textSize="18sp"
android:visibility="gone" />
<com.spiceladdoo.views.LatoRegularTextView
android:id="#+id/offerTypeTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:ellipsize="end"
android:gravity="center"
android:maxLines="2"
android:text=""
android:textColor="#color/lower_text_color"
android:textSize="14sp" />
</LinearLayout>
<FrameLayout
android:id="#+id/frameLayoutAmount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginTop="20dp"
android:clickable="true"
android:focusable="true"
android:gravity="right">
<ImageView
android:id="#+id/iv_rupee_bg"
android:layout_width="70dp"
android:layout_height="30dp"
android:layout_marginRight="-15dp"
android:background="#drawable/deals_image_background" />
<com.spiceladdoo.views.LatoRegularTextView
android:id="#+id/tv_amount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:paddingLeft="4dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffff"
android:textSize="17sp" />
</FrameLayout>
</RelativeLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id="#+id/cardview_descImage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/card_offer"
android:layout_marginTop="10dp"
android:paddingBottom="5dp"
android:paddingTop="5dp">
<ImageView
android:id="#+id/dealDescriptionImageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="#null"
android:visibility="visible" />
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id="#+id/cardview_shortDesc"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="#id/cardview_descImage"
android:layout_marginTop="10dp"
android:padding="5dp">
<WebView
android:id="#+id/shortDescWebView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible" />
</android.support.v7.widget.CardView>
<com.spiceladdoo.views.LatoBoldTextView
android:id="#+id/related_offer_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/cardview_shortDesc"
android:layout_gravity="center"
android:layout_marginRight="10dp"
android:text="SIMILAR OFFERS"
android:textColor="#color/text_color"
android:textSize="13sp" />
<android.support.v7.widget.RecyclerView
android:id="#+id/recyclerViewoffers"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_below="#id/related_offer_text"
android:layout_marginTop="10dp"
android:scrollbars="none" />
<ProgressBar
android:id="#+id/shortDescriptionProgress"
style="?android:attr/android:progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="visible" />
</RelativeLayout>
</ScrollView>
<com.spiceladdoo.views.LatoRegularTextView
android:id="#+id/installTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_marginTop="5dp"
android:background="#color/newFreeBColor"
android:gravity="center"
android:paddingBottom="15dp"
android:paddingTop="15dp"
android:text="INSTALL"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#FFFFFF"
android:textSize="16sp"
android:textStyle="bold"
android:visibility="visible" />
<FrameLayout
android:id="#+id/hint"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="#+id/layoutInstallHint"
android:background="#99000000"></RelativeLayout>
<RelativeLayout
android:id="#+id/layoutInstallHint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:background="#99000000">
<com.spiceladdoo.views.LatoRegularTextView
android:id="#+id/installTextHint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginBottom="15dp"
android:layout_marginTop="5dp"
android:background="#color/spice_laddooblue"
android:paddingBottom="10dp"
android:paddingLeft="80dp"
android:paddingRight="80dp"
android:paddingTop="10dp"
android:text="INSTALL"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#FFFFFF"
android:textSize="15sp"
android:textStyle="bold"
android:visibility="visible" />
</RelativeLayout>
<com.spiceladdoo.views.LatoRegularTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/imageViewHintPinIcon"
android:layout_centerHorizontal="true"
android:text="Click on Button"
android:textColor="#color/white"
android:textSize="18sp" />
<ImageView
android:id="#+id/imageViewHintPinIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="50dp"
android:src="#drawable/hint_pin_down" />
</RelativeLayout>
</FrameLayout>
</RelativeLayout>
I think you have made mistake in giving webview's height you have given it as wrap_content instead try match_parent and give it try
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
android:id="#+id/toolbar"
layout="#layout/toolbar" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/fragment_back_color">
<ScrollView
android:id="#+id/offerDetailScrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:layout_above="#+id/installTextView">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp">
<android.support.v7.widget.CardView
android:id="#+id/card_offer"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="#+id/topViewDealDisplay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/white"
android:gravity="center"
android:orientation="vertical"
android:paddingBottom="10dp"
android:paddingTop="10dp">
<ImageView
android:id="#+id/dealImageView"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_centerInParent="true"
android:layout_margin="5dp"></ImageView>
<com.spiceladdoo.views.LatoRegularTextView
android:id="#+id/dealNameTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="4dp"
android:text=""
android:textColor="#color/text_color"
android:textSize="18sp" />
<com.spiceladdoo.views.LatoRegularTextView
android:id="#+id/offerTitleTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="4dp"
android:text="deal titile"
android:textColor="#color/lower_text_color"
android:textSize="18sp"
android:visibility="gone" />
<com.spiceladdoo.views.LatoRegularTextView
android:id="#+id/offerTypeTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:ellipsize="end"
android:gravity="center"
android:maxLines="2"
android:text=""
android:textColor="#color/lower_text_color"
android:textSize="14sp" />
</LinearLayout>
<FrameLayout
android:id="#+id/frameLayoutAmount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginTop="20dp"
android:clickable="true"
android:focusable="true"
android:gravity="right">
<ImageView
android:id="#+id/iv_rupee_bg"
android:layout_width="70dp"
android:layout_height="30dp"
android:layout_marginRight="-15dp"
android:background="#drawable/deals_image_background" />
<com.spiceladdoo.views.LatoRegularTextView
android:id="#+id/tv_amount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:paddingLeft="4dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffff"
android:textSize="17sp" />
</FrameLayout>
</RelativeLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id="#+id/cardview_descImage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/card_offer"
android:layout_marginTop="10dp"
android:paddingBottom="5dp"
android:paddingTop="5dp">
<ImageView
android:id="#+id/dealDescriptionImageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="#null"
android:visibility="visible" />
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id="#+id/cardview_shortDesc"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="#id/cardview_descImage"
android:layout_marginTop="10dp"
android:padding="5dp">
<WebView
android:id="#+id/shortDescWebView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible" />
</android.support.v7.widget.CardView>
<com.spiceladdoo.views.LatoBoldTextView
android:id="#+id/related_offer_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/cardview_shortDesc"
android:layout_gravity="center"
android:layout_marginRight="10dp"
android:text="SIMILAR OFFERS"
android:textColor="#color/text_color"
android:textSize="13sp" />
<android.support.v7.widget.RecyclerView
android:id="#+id/recyclerViewoffers"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_below="#id/related_offer_text"
android:layout_marginTop="10dp"
android:scrollbars="none" />
<ProgressBar
android:id="#+id/shortDescriptionProgress"
style="?android:attr/android:progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="visible" />
</RelativeLayout>
</ScrollView>
<com.spiceladdoo.views.LatoRegularTextView
android:id="#+id/installTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_marginTop="5dp"
android:background="#color/newFreeBColor"
android:gravity="center"
android:paddingBottom="15dp"
android:paddingTop="15dp"
android:text="INSTALL"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#FFFFFF"
android:textSize="16sp"
android:textStyle="bold"
android:visibility="visible" />
<FrameLayout
android:id="#+id/hint"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="#+id/layoutInstallHint"
android:background="#99000000"></RelativeLayout>
<RelativeLayout
android:id="#+id/layoutInstallHint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:background="#99000000">
<com.spiceladdoo.views.LatoRegularTextView
android:id="#+id/installTextHint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginBottom="15dp"
android:layout_marginTop="5dp"
android:background="#color/spice_laddooblue"
android:paddingBottom="10dp"
android:paddingLeft="80dp"
android:paddingRight="80dp"
android:paddingTop="10dp"
android:text="INSTALL"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#FFFFFF"
android:textSize="15sp"
android:textStyle="bold"
android:visibility="visible" />
</RelativeLayout>
<com.spiceladdoo.views.LatoRegularTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/imageViewHintPinIcon"
android:layout_centerHorizontal="true"
android:text="Click on Button"
android:textColor="#color/white"
android:textSize="18sp" />
<ImageView
android:id="#+id/imageViewHintPinIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="50dp"
android:src="#drawable/hint_pin_down" />
</RelativeLayout>
</FrameLayout>
</RelativeLayout>
or if this not work then you can put scrollview inside cardview and then webview in card view

Scrolling not working in android xml layout?

I am getting problem to make this layout scroll it is not scrolling. I have also used the Scrollview in this. I am not able to detect why it is not working. This is a login screen with Social Login buttons at the bottom of the screen. but it is not working.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/mail_login"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#mipmap/login_bg_img"
android:isScrollContainer="true">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:isScrollContainer="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:isScrollContainer="true">
<TextView
android:id="#+id/txt_heading"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="15dp"
android:background="#null"
android:gravity="center"
android:text="Sign In"
android:textColor="#ffffff"
android:textSize="#dimen/Login_signinText" />
<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_marginTop="55dp"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="30dp"
android:src="#mipmap/login_logo_icon" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#mipmap/login_input_bar1"
android:gravity="left|center_vertical"
android:orientation="vertical">
<EditText
android:id="#+id/et_email_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#null"
android:hint="Username"
android:maxLength="20"
android:maxLines="1"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="#777e86"
android:textColorHint="#777e86"
android:textSize="#dimen/Login_username" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/ll_singup_password"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#mipmap/login_input_bar2"
android:gravity="left|center_vertical"
android:orientation="vertical">
<EditText
android:id="#+id/et_password_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#null"
android:hint="Password"
android:inputType="textPassword"
android:maxLength="15"
android:maxLines="1"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="#777e86"
android:textColorHint="#777e86"
android:textSize="#dimen/Login_username" />
</LinearLayout>
<TextView
android:id="#+id/txt_forget_password"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginTop="5dp"
android:text="Forgot Password?"
android:textColor="#ffffff"
android:textSize="#dimen/Login_forgotpassword" />
<TextView
android:id="#+id/txt_sign_up"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginTop="30dp"
android:gravity="center"
android:text="Forget Password"
android:textColor="#ffffff"
android:textSize="#dimen/Login_forgotpassword" />
</LinearLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="15dp"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="#+id/login_btn"
style="?android:borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#mipmap/login_btn" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="Let me in"
android:textColor="#fff"
android:textSize="18sp" />
</RelativeLayout>
<!--<LinearLayout-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:orientation="vertical"-->
<!--android:gravity="center"-->
<!--android:layout_marginTop="15dp"-->
<!--android:paddingBottom="10dp"-->
<!--android:layout_alignParentBottom="true">-->
<!--<TextView-->
<!--android:id="#+id/forgot_login"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:paddingBottom="8dp"-->
<!--android:paddingRight="5dp"-->
<!--android:text="Forgot Password ?"-->
<!--android:textSize="18sp"-->
<!--android:textColor="#fff"/>-->
<!--</LinearLayout>-->
<!--<LinearLayout-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:orientation="vertical"-->
<!--android:gravity="center"-->
<!--android:layout_marginTop="25dp"-->
<!--android:paddingBottom="10dp"-->
<!--android:layout_alignParentBottom="true">-->
<!--<TextView-->
<!--android:id="#+id/Sign_up"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:paddingBottom="8dp"-->
<!--android:paddingRight="5dp"-->
<!--android:text="Don't have an account? Sign Up"-->
<!--android:textSize="18sp"-->
<!--android:textColor="#fff"/>-->
<!--</LinearLayout>-->
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginTop="30dp"
android:orientation="horizontal"
android:weightSum="3">
<LinearLayout
android:id="#+id/ll_fb"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#mipmap/login_facebook_btn"
android:orientation="horizontal">
</LinearLayout>
<LinearLayout
android:id="#+id/ll_google"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#mipmap/login_google_btn"
android:orientation="horizontal">
</LinearLayout>
<LinearLayout
android:id="#+id/ll_twitter"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#mipmap/login_twitter_btn"
android:orientation="horizontal">
</LinearLayout>
</LinearLayout>
Try to work like that
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/llbottom"
android:layout_alignParentTop="true"
>
and take id to your bottom id
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginTop="30dp"
android:orientation="horizontal"
android:id="#+id/llbottom"
android:weightSum="3">
close the tag at the end.</RelativeLayout>
Try adding this attribute to your scrollviewer:
android:fillViewport="true"
You use this.`
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/mail_login"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#mipmap/ic_launcher"
>
<ScrollView
android:layout_width="match_parent"
android:layout_height="120dp"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:isScrollContainer="true">
<TextView
android:id="#+id/txt_heading"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="15dp"
android:background="#null"
android:gravity="center"
android:text="Sign In"
android:textColor="#ffffff"
android:textSize="12sp" />
<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_marginTop="55dp"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="30dp"
android:src="#mipmap/ic_launcher" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#mipmap/ic_launcher"
android:gravity="left|center_vertical"
android:orientation="vertical">
<EditText
android:id="#+id/et_email_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#null"
android:hint="Username"
android:maxLength="20"
android:maxLines="1"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="#777e86"
android:textColorHint="#777e86"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/ll_singup_password"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#mipmap/ic_launcher"
android:gravity="left|center_vertical"
android:orientation="vertical">
<EditText
android:id="#+id/et_password_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#null"
android:hint="Password"
android:inputType="textPassword"
android:maxLength="15"
android:maxLines="1"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="#777e86"
android:textColorHint="#777e86"
android:textSize="12sp" />
</LinearLayout>
<TextView
android:id="#+id/txt_forget_password"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginTop="5dp"
android:text="Forgot Password?"
android:textColor="#ffffff"
android:textSize="12sp" />
<TextView
android:id="#+id/txt_sign_up"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginTop="30dp"
android:gravity="center"
android:text="Forget Password"
android:textColor="#ffffff"
android:textSize="12sp" />
</LinearLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="15dp"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="#+id/login_btn"
style="?android:borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#mipmap/ic_launcher" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="Let me in"
android:textColor="#fff"
android:textSize="18sp" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginTop="30dp"
android:orientation="horizontal"
android:weightSum="3">
<LinearLayout
android:id="#+id/ll_fb"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#mipmap/ic_launcher"
android:orientation="horizontal">
</LinearLayout>
</LinearLayout>
</RelativeLayout>

Categories

Resources