I am trying to create a page with multiple CardView and somehow I notice that some CardView display weirdly.
Some have smooth shadow transitions while the one at the bottom looks like the shadows were cut.
Here is my 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/white"
app:layout_behavior="#string/appbar_scrolling_view_behavior">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<RelativeLayout
android:id="#+id/banners"
android:layout_width="match_parent"
android:layout_height="#dimen/banner_height">
<android.support.v4.view.ViewPager
android:id="#+id/banner_viewpager"
android:layout_width="match_parent"
android:layout_height="#dimen/banner_height" />
<com.rd.PageIndicatorView
android:id="#+id/pageIndicatorView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
app:piv_animationType="scale"
app:piv_dynamicCount="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="10dp"
app:piv_interactiveAnimation="true"
app:piv_selectedColor="#color/white"
app:piv_unselectedColor="#color/white_50"
app:piv_viewPager="#id/banner_viewpager"
app:piv_padding="12dp"
app:piv_radius="5dp" />
</RelativeLayout>
<android.support.v7.widget.CardView
android:id="#+id/challenges"
android:layout_width="match_parent"
android:layout_height="130dp"
android:layout_below="#id/banners"
android:layout_margin="10dp"
android:background="#color/quest_beige"
app:cardBackgroundColor="#color/quest_beige"
app:cardElevation="10dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:layout_toLeftOf="#id/start_quest"
android:src="#drawable/challenges" />
<Button
android:id="#+id/start_quest"
android:layout_width="110dp"
android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:background="#drawable/rounded_main_orange"
android:text="START QUEST"
android:textColor="#color/white"
android:textStyle="bold" />
</RelativeLayout>
</android.support.v7.widget.CardView>
<LinearLayout
android:id="#+id/body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/challenges"
android:orientation="horizontal"
android:weightSum="2">
<android.support.v7.widget.CardView
android:id="#+id/weather"
android:layout_width="0dp"
android:layout_height="250dp"
android:layout_margin="10dp"
android:layout_weight="0.8"
app:cardBackgroundColor="#color/white"
app:cardElevation="10dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/splash_gradient"
android:padding="10dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:src="#drawable/splash_gradient" />
<TextView
android:id="#+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="#font/lato_light"
android:text="JUN 19"
android:textColor="#color/dark_gray"
android:textSize="20sp" />
<TextView
android:id="#+id/day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/date"
android:fontFamily="#font/lato_light"
android:text="TUESDAY"
android:textColor="#color/dark_gray"
android:textSize="20sp" />
<TextView
android:id="#+id/temperature"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#id/day"
android:layout_marginTop="10dp"
android:fontFamily="#font/lato_light"
android:text="69º"
android:textColor="#color/light_gray"
android:textSize="40sp" />
<ImageView
android:id="#+id/weather_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/temperature"
android:layout_above="#+id/weather_text"
android:src="#drawable/sunny" />
<TextView
android:id="#id/weather_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="#font/lato_light"
android:text="MOSTLY SUNNY"
android:layout_alignParentBottom="true"
android:textColor="#color/dark_gray"
android:textSize="20sp" />
</RelativeLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id="#+id/samar_info"
android:layout_width="0dp"
android:layout_height="250dp"
android:layout_margin="10dp"
android:layout_weight="1.2"
android:background="#color/white"
app:cardBackgroundColor="#color/white"
app:cardElevation="10dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp">
<TextView
android:id="#+id/info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="#font/lato_light"
android:text="#string/samar_info"
android:textColor="#color/dark_gray"
android:textSize="20sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:fontFamily="#font/lato_regular"
android:text="LEARN MORE"
android:layout_alignParentBottom="true"
android:textColor="#color/main_orange"
android:textSize="18sp" />
</RelativeLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
<!--<android.support.v7.widget.CardView-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="170dp"-->
<!--android:layout_below="#+id/body"-->
<!--android:layout_margin="10dp"-->
<!--android:background="#color/slate_green"-->
<!--app:cardBackgroundColor="#color/slate_green"-->
<!--app:cardElevation="10dp">-->
<!--<RelativeLayout-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent">-->
<!--<RelativeLayout-->
<!--android:id="#+id/logos"-->
<!--android:layout_marginTop="10dp"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_centerHorizontal="true"-->
<!--android:orientation="horizontal">-->
<!--<ImageView-->
<!--android:layout_width="25dp"-->
<!--android:layout_height="70dp"-->
<!--android:layout_toLeftOf="#id/samar_logo"-->
<!--android:src="#drawable/logo_white" />-->
<!--<ImageView-->
<!--android:id="#+id/samar_logo"-->
<!--android:layout_width="50dp"-->
<!--android:layout_height="70dp"-->
<!--android:layout_marginLeft="20dp"-->
<!--android:layout_marginRight="20dp"-->
<!--android:layout_alignParentTop="true"-->
<!--android:layout_centerHorizontal="true"-->
<!--android:src="#drawable/samar_logo" />-->
<!--<ImageView-->
<!--android:layout_width="50dp"-->
<!--android:layout_height="70dp"-->
<!--android:layout_toRightOf="#id/samar_logo"-->
<!--android:src="#drawable/dot_logo" />-->
<!--</RelativeLayout>-->
<!--<ImageView-->
<!--android:layout_centerHorizontal="true"-->
<!--android:layout_marginTop="20dp"-->
<!--android:layout_below="#id/logos"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="60dp"-->
<!--android:src="#drawable/contact"/>-->
<!--</RelativeLayout>-->
<!--</android.support.v7.widget.CardView>-->
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="130dp"
android:layout_below="#id/body"
android:layout_margin="10dp"
android:background="#color/quest_beige"
app:cardBackgroundColor="#color/quest_beige"
app:cardElevation="5dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:layout_toLeftOf="#id/start_quest1"
android:src="#drawable/challenges" />
<Button
android:id="#+id/start_quest1"
android:layout_width="110dp"
android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:background="#drawable/rounded_main_orange"
android:text="START QUEST"
android:textColor="#color/white"
android:textStyle="bold" />
</RelativeLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>
It looks like some of those cards do not get enough padding, add this to your xml for problematic cards : usecompatpadding="true"
Related
I have included a progress bar in my relative layout, but it is running behind the layout. Is there any way I can bring it in front show that it show when the page is loading.
[Sorry, I'm pasting whole XML file, cause I don't know where to put progress bar! as I'm newbie, I want you to help me. Sorry again!]
Code:
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/backgroundcolor"
tools:context="com.tekitsolutions.remindme.Activity.AddReminderActivity">
<!--TODO:-> Toolbar Layout-->
<androidx.appcompat.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/toolbarcolor"
android:minHeight="?attr/actionBarSize"
app:theme="#style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:title="#string/title_add_reminder" />
<ScrollView
android:id="#+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_below="#id/toolbar">
<RelativeLayout
android:id="#+id/layout_relative"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="#layout/row_progress_bar" />
<!--TODO:-> Parent Layout-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="vertical"
android:paddingLeft="#dimen/activity_vertical_padding"
android:paddingRight="#dimen/activity_vertical_margin">
<!--TODO:-> Title & Category Layout-->
<RelativeLayout
android:id="#+id/layout_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="#dimen/view_margin_top">
<LinearLayout
style="#style/dialog_main_linear_layout_style"
android:padding="8dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="#+id/title"
style="#style/heading_textview_style1"
android:text="#string/heading_title"
android:textSize="#dimen/heading_text_size" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" *"
android:textColor="#color/colorRed"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/title_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
style="#style/vector_image_style"
android:tint="?attr/iconcolor"
app:srcCompat="#drawable/ic_view_heading" />
<EditText
android:id="#+id/et_title"
style="#style/text_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginEnd="100dp"
android:backgroundTint="#color/colorIconLightGray"
android:digits="0123456789 abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ अआइईउऊऋएऐओऔकखगघङचछजझञाटठडढणतथदधनपफबभमयरलवशषसहक्षत्रज्ञ ा ि ी ु ू ृ े ै ो ौ ं ः "
android:imeOptions="actionNext"
android:singleLine="true"
android:maxLength="25"
android:maxLines="1"
android:textSize="17sp" />
</LinearLayout>
<!--TODO:-> Title error-->
<include
android:id="#+id/tv_title_error"
layout="#layout/row_error_textview" />
<RelativeLayout
android:id="#+id/layout_category"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Spinner
android:id="#+id/spin_list"
style="#style/Widget.AppCompat.Spinner.Underlined"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginEnd="8dp"
android:backgroundTint="?attr/iconcolor"
android:dropDownVerticalOffset="17dp"
android:spinnerMode="dropdown"
android:textSize="#dimen/input_text_size" />
<TextView
android:id="#+id/tv_selected_category"
style="#style/text_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_centerHorizontal="true"
android:layout_toLeftOf="#+id/circle_card1"
android:text="#string/hint_select_category"
android:textSize="#dimen/input_text_size" />
<androidx.cardview.widget.CardView
android:id="#+id/circle_card1"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:elevation="12dp"
android:innerRadius="0dp"
android:shape="ring"
android:thicknessRatio="0"
app:cardCornerRadius="13dp">
<ImageView
android:id="#+id/category_image"
android:layout_width="wrap_content"
android:layout_height="25dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:visibility="visible"
app:srcCompat="#drawable/ic_keyboard_arrow_down_black_24dp" />
<Button
android:id="#+id/custom_category_image"
android:layout_width="match_parent"
android:layout_height="25dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:background="#drawable/bg_circle_btn"
android:text="A"
android:textColor="#color/colorWhite"
android:textSize="12dp"
android:visibility="gone"
app:srcCompat="#drawable/ic_navigate_next_black_24dp" />
</androidx.cardview.widget.CardView>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#color/colorDarkerGray" />
<!--TODO:-> Amount Layout-->
<RelativeLayout
android:id="#+id/layout_amount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/view_margin_top">
<LinearLayout
style="#style/dialog_main_linear_layout_style"
android:padding="8dp">
<TextView
style="#style/heading_textview_style"
android:text="#string/heading_amount"
android:textSize="#dimen/heading_text_size" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="#+id/iv_amount"
style="#style/vector_image_style"
android:tint="?attr/iconcolor"
app:srcCompat="#drawable/currency_inr" />
<EditText
android:id="#+id/et_amount"
style="#style/text_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:backgroundTint="#color/colorIconLightGray"
android:hint="0.00"
android:inputType="numberDecimal"
android:maxLength="7"
android:textSize="17sp" />
</LinearLayout>
<RelativeLayout
android:id="#+id/layout_payment_option"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible">
<TextView
android:id="#+id/tv_selected_payment_mode"
style="#style/text_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_toLeftOf="#+id/circle_card2"
android:gravity="end"
android:text="#string/select_payment"
android:textSize="#dimen/input_text_size" />
<androidx.cardview.widget.CardView
android:id="#+id/circle_card2"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_alignParentRight="true"
android:elevation="12dp"
android:innerRadius="0dp"
android:shape="ring"
android:thicknessRatio="0"
app:cardCornerRadius="13dp">
<ImageView
android:id="#+id/payment_image"
android:layout_width="match_parent"
android:layout_height="25dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
app:srcCompat="#drawable/ic_keyboard_arrow_down_black_24dp"></ImageView>
</androidx.cardview.widget.CardView>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#color/colorDarkerGray" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:padding="8dp"
android:text="Select Date and Time"
style="#style/text_color"
android:textSize="16sp"
/>
<!--TODO:-> Due date Layout-->
<RelativeLayout
android:id="#+id/layout_due_date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/view_margin_top">
<ImageView
android:id="#+id/iv_due_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tint="?attr/iconcolor"
app:srcCompat="#drawable/ic_icon_date" />
<RelativeLayout
android:id="#+id/date_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginBottom="8dp"
android:layout_toRightOf="#id/iv_due_date">
<TextView
style="#style/text_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="#string/heading_due_date"
android:textSize="#dimen/heading_text_size" />
<TextView
android:id="#+id/tv_due_date"
style="#style/text_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_gravity="end"
android:layout_marginRight="12dp"
android:hint="YYYY-MM-DD"
android:textAlignment="textEnd"
android:textSize="#dimen/input_text_size" />
</RelativeLayout>
</RelativeLayout>
<!--TODO:-> Due date error-->
<include
android:id="#+id/tv_due_date_error"
layout="#layout/row_error_textview" />
<!--TODO:-> Alarm Layout-->
<RelativeLayout
android:id="#+id/layout_alarm_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/layout_due_date"
android:layout_marginTop="#dimen/view_margin_top"
android:layout_marginBottom="8dp">
<ImageView
android:id="#+id/iv_alarm_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tint="?attr/iconcolor"
app:srcCompat="#drawable/ic_icon_alarm" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_toRightOf="#id/iv_alarm_time"
android:orientation="vertical">
<TextView
style="#style/text_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="#string/heading_alarm_time"
android:textSize="#dimen/heading_text_size" />
<TextView
android:id="#+id/tv_alarm_time"
style="#style/text_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_gravity="end"
android:layout_marginRight="12dp"
android:hint="HH:MM"
android:textAlignment="textEnd"
android:textSize="#dimen/input_text_size" />
<TextView
android:id="#+id/tv_error_alarm_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Please select Alarm Time"
android:textColor="#color/colorRed"
android:visibility="gone" />
</RelativeLayout>
</RelativeLayout>
<!--TODO:-> Alarm error-->
<include
android:id="#+id/tv_time_error"
layout="#layout/row_error_textview" />
<RelativeLayout
android:id="#+id/frequency_layout"
style="#style/sub_relative_layout_style">
<TextView
style="#style/sub_text_view_style"
android:text="Alarm Frequency" />
<ImageView
android:id="#+id/collapse"
style="#style/visibilities_image_style"
android:layout_centerVertical="true"
android:visibility="visible"
app:srcCompat="#drawable/ic_keyboard_arrow_down_black_24dp" />
<ImageView
android:id="#+id/expand"
style="#style/visibilities_image_style"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:visibility="gone"
app:srcCompat="#drawable/ic_keyboard_arrow_up_black_24dp" />
</RelativeLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#color/colorDarkerGray" />
<!--TODO:-> Note Layout-->
<RelativeLayout
android:id="#+id/layout_notes"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/layout_repeat"
android:layout_marginTop="#dimen/view_margin_top">
<ImageView
android:id="#+id/iv_note"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_marginLeft="8dp"
android:layout_marginRight="12dp"
android:tint="?attr/iconcolor"
app:srcCompat="#drawable/ic_keyboard_arrow_down_black_24dp" />
<LinearLayout
android:id="#+id/note_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_toLeftOf="#+id/iv_note"
android:orientation="horizontal">
<TextView
style="#style/text_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/heading_note"
android:textSize="#dimen/heading_text_size" />
<TextView
android:id="#+id/note_desc"
android:textColor="?attr/textcolor"
android:textSize="16sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:maxLines="4" />
</LinearLayout>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="8dp"
android:background="#color/colorDarkerGray" />
</LinearLayout>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
row_progress_bar:
<?xml version="1.0" encoding="utf-8"?>
<ProgressBar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/progress_bar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:theme="#style/AppTheme.WhiteAccent"
android:visibility="gone" />
I have an activity with view pager and I'm loading fragments which has NestedScrollView as parent with cards in it. The data in the card is loaded dynamically and doesn't have fixed height. The card's height is set to wrap_content.
The problem is that the NestedScrollView is not displaying the cards properly after the data is loaded. In some cases the cards overlap each other, while in some, the cards are not visible at all (usually the last).
The activity:
<?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:id="#+id/activity_generic_candidate_profile"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.interviewair.interviewairforemployer.ui.genericCandidateProfile.GenericCandidateProfileActivity">
<android.support.design.widget.AppBarLayout
android:id="#+id/appbarlayout_all"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:theme="#style/AppTheme.AppBarOverlay">
<android.support.design.widget.CollapsingToolbarLayout
android:id="#+id/collapsingtoolbar_genericcandidateprofile"
android:layout_width="match_parent"
android:layout_height="300dp"
android:fitsSystemWindows="true"
app:contentScrim="?attr/colorPrimary"
app:expandedTitleTextAppearance="#android:color/transparent"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="150dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha="0.5"
android:background="#color/black" />
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:src="#drawable/ic_play_circle_outline_black_24px"
android:tint="#color/white"
android:elevation="10dp"
android:alpha="0.7"
android:layout_gravity="center"/>
</FrameLayout>
<de.hdodenhof.circleimageview.CircleImageView
android:id="#+id/circleimageview_genericcandidateprofile_photo"
android:layout_width="75dp"
android:layout_height="75dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="#dimen/margin_10"
android:src="#drawable/ic_person_outline_white_48px"
app:civ_border_color="#color/white"
app:civ_border_width="1.5dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="30dp"
android:layout_marginStart="#dimen/margin_10"
android:orientation="vertical">
<TextView
android:id="#+id/textview_genericcandidateprofile_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/margin_5"
android:drawablePadding="#dimen/padding_5"
android:gravity="center_vertical"
android:textColor="#color/white"
android:textSize="#dimen/di_text_medium"
android:textStyle="bold" />
<TextView
android:id="#+id/textview_genericcandidateprofile_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/margin_5"
android:alpha="0.8"
android:drawableLeft="#drawable/ic_work_black_18dp"
android:drawablePadding="#dimen/padding_5"
android:gravity="center_vertical"
android:textColor="#color/white"
android:textSize="#dimen/di_text_regular" />
<TextView
android:id="#+id/textview_genericcandidateprofile_location"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/margin_5"
android:alpha="0.8"
android:drawableLeft="#drawable/ic_location_on_black_18px"
android:drawablePadding="#dimen/padding_5"
android:gravity="center_vertical"
android:text="Mumbai, Maharashtra"
android:textColor="#color/white"
android:textSize="#dimen/di_text_regular" />
</LinearLayout>
</FrameLayout>
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar_genericcandidateprofile"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="#style/AppTheme.PopupOverlay" />
</android.support.design.widget.CollapsingToolbarLayout>
<android.support.design.widget.TabLayout
android:id="#+id/tablayout_genericcandidateprofile_tab"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_collapseMode="pin"
app:tabGravity="fill"
app:tabIndicatorColor="#color/white"
app:tabIndicatorHeight="5dp"
app:tabMode="scrollable"
app:tabSelectedTextColor="#color/white"
app:tabTextColor="#color/grey500" />
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="#+id/viewpager_genericcandidateprofile_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="#string/appbar_scrolling_view_behavior" />
<android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginEnd="#dimen/fab_margin"
android:layout_marginBottom="#dimen/fab_margin"
app:borderWidth="0dp"
app:elevation="6dp"
app:pressedTranslationZ="12dp"
android:clickable="true"
app:rippleColor="#color/colorPrimary"
android:src="#drawable/ic_dashboard_white_24px"/>
</android.support.design.widget.CoordinatorLayout>
The fragment that is being loaded:
<android.support.v7.widget.CardView
android:id="#+id/cardview_overview_skills"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="#dimen/margin_5">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="#dimen/padding_10">
<TextView
android:id="#+id/textview_overview_skilltitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="#dimen/padding_5"
android:gravity="center_vertical"
android:text="#string/text_skills"
android:textColor="#color/colorPrimary"
android:textSize="#dimen/di_text_regular" />
<com.dpizarro.autolabel.library.AutoLabelUI
android:id="#+id/autolabel_overview_skillchips"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/textview_overview_skilltitle"
android:layout_marginTop="#dimen/margin_10"
autolabel:label_background_res="#drawable/custom_rounded_background"
autolabel:label_clickable="false"
autolabel:show_cross="false"
autolabel:text_color="#android:color/black"
autolabel:text_size="#dimen/di_text_small" />
<ImageView
android:id="#+id/imageview_overview_retry_skills"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_centerInParent="true"
android:background="#drawable/custom_button_grey_background"
android:src="#drawable/ic_refresh_black_24px"
android:tint="#color/colorAccent"
android:visibility="gone" />
<ProgressBar
android:id="#+id/progressbar_overview_skillpb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:indeterminate="true"
android:visibility="gone" />
</RelativeLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id="#+id/cardview_overview_preferredlocation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/cardview_overview_skills"
android:layout_margin="#dimen/margin_5">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="#dimen/padding_10">
<TextView
android:id="#+id/textview_overview_loctitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="#string/text_preferred_location"
android:textColor="#color/colorPrimary"
android:textSize="#dimen/di_text_regular" />
<com.dpizarro.autolabel.library.AutoLabelUI
android:id="#+id/autolabel_overview_preflocchips"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/textview_overview_loctitle"
android:layout_marginTop="#dimen/margin_10"
autolabel:label_background_res="#drawable/custom_rounded_background"
autolabel:label_clickable="false"
autolabel:show_cross="false"
autolabel:text_color="#android:color/black"
autolabel:text_size="#dimen/di_text_small" />
<ImageView
android:id="#+id/imageview_overview_retry_loc"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_centerInParent="true"
android:background="#drawable/custom_button_grey_background"
android:src="#drawable/ic_refresh_black_24px"
android:tint="#color/colorAccent"
android:visibility="gone" />
<ProgressBar
android:id="#+id/progressbar_overview_locpb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:indeterminate="true"
android:visibility="gone" />
</RelativeLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id="#+id/cardview_overview_personal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/cardview_overview_eduexp"
android:layout_margin="#dimen/margin_5">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="#dimen/padding_5">
<TextView
android:id="#+id/textview_overview_personaltitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="#dimen/padding_5"
android:gravity="center_vertical"
android:text="#string/text_personal"
android:textColor="#color/colorPrimary"
android:textSize="#dimen/di_text_regular" />
<LinearLayout
android:id="#+id/linearlayout_overview_personalwrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="#dimen/margin_5"
android:layout_marginTop="#dimen/margin_10"
android:orientation="vertical"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="75dp"
android:layout_height="wrap_content"
android:text="#string/text_email"
android:textColor="#color/grey700"
android:textSize="#dimen/di_text_regular" />
<TextView
android:id="#+id/textview_overview_email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/black"
android:textSize="#dimen/di_text_regular" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/margin_5"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="75dp"
android:layout_height="wrap_content"
android:text="#string/text_mobile"
android:textColor="#color/grey700"
android:textSize="#dimen/di_text_regular" />
<TextView
android:id="#+id/textview_overview_mobile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/black"
android:textSize="#dimen/di_text_regular" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/margin_5"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="75dp"
android:layout_height="wrap_content"
android:text="#string/text_dob"
android:textColor="#color/grey700"
android:textSize="#dimen/di_text_regular" />
<TextView
android:id="#+id/textview_overview_dob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/black"
android:textSize="#dimen/di_text_regular" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/margin_5"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="75dp"
android:layout_height="wrap_content"
android:text="#string/text_gender"
android:textColor="#color/grey700"
android:textSize="#dimen/di_text_regular" />
<TextView
android:id="#+id/textview_overview_gender"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/black"
android:textSize="#dimen/di_text_regular" />
</LinearLayout>
</LinearLayout>
<ImageView
android:id="#+id/imageview_overview_retry_personal"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:background="#drawable/custom_button_grey_background"
android:src="#drawable/ic_refresh_black_24px"
android:tint="#color/colorAccent"
android:visibility="gone" />
<ProgressBar
android:id="#+id/progressbar_overview_personalpb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:indeterminate="true"
android:visibility="gone" />
</LinearLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>
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
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>
I want the recyclerview must work like facebook videoview list.I have added a footer at the end of the recyclerview items just like facebook. everything is working fine except the row color change is not working. I want the middle item view must be transparent and other items must be black in color on scroll of the recyclerview
<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:background="#color/colorPrimary"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center"
android:src="#drawable/icon" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="#+id/videoTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="5dp"
android:text="Category"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textSize="20sp" />
<TextView
android:id="#+id/videoDate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="5dp"
android:text="Date"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textSize="20sp" />
</LinearLayout>
<ImageView
android:id="#+id/shareButton"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_gravity="start"
android:padding="8dp"
android:src="#drawable/share" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="#+id/addedon"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp"
android:text="addedOn"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textSize="20sp" />
</LinearLayout>
</LinearLayout>
<FrameLayout
android:id="#+id/videoFrame"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_gravity="center"
android:layout_weight="1"
android:orientation="vertical">
<!-- videoView layout-->
<FrameLayout
android:id="#+id/videoFrameLayout"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_gravity="center"
android:background="#color/colorPrimary">
<RelativeLayout
android:id="#+id/videoRelativelayout"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_gravity="center">
<VideoView
android:id="#+id/videoplayer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_centerInParent="true"
android:layout_gravity="center" />
<!-- mediaControls layout-->
<LinearLayout
android:id="#+id/mediaControls"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom"
android:background="#color/colorPrimary"
android:orientation="horizontal">
<!--<RelativeLayout-->
<!--android:layout_width="50dp"-->
<!--android:layout_height="50dp"-->
<!--android:layout_gravity="center">-->
<!--<ImageView-->
<!--android:id="#+id/videoPlay"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"-->
<!--android:clickable="true"-->
<!--android:contentDescription="#string/description"-->
<!--android:src="#drawable/play_icon" />-->
<!--<ImageView-->
<!--android:id="#+id/videoPause"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"-->
<!--android:clickable="true"-->
<!--android:contentDescription="#string/description"-->
<!--android:src="#drawable/pause_icon" />-->
<!--</RelativeLayout>-->
<!--<TextView-->
<!--android:id="#+id/lblCurrentPosition"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_gravity="center"-->
<!--android:text="#string/empty_message"-->
<!--android:textColor="#FFF" />-->
<SeekBar
android:id="#+id/mediacontroller_progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:max="100"
android:maxHeight="1000dp"
android:minHeight="2dip"
android:progress="0"
android:progressDrawable="#drawable/progress_drawable"
android:thumb="#drawable/thumb"
android:thumbOffset="0px" />
<!--<TextView-->
<!--android:id="#+id/lblRemainingPosition"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_gravity="center"-->
<!--android:text="#string/empty_message"-->
<!--android:textColor="#FFF" />-->
<TextView
android:id="#+id/lblCurrentPosition"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="#string/empty_message"
android:textColor="#FFF" />
<RelativeLayout
android:layout_width="50dp"
android:layout_height="match_parent">
<ImageView
android:id="#+id/fullscreen"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:src="#drawable/fullscreen" />
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
</FrameLayout>
<ProgressBar
android:id="#+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
<RelativeLayout
android:id="#+id/imagePreviewLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:id="#+id/abovePlayButton"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_alignParentTop="true"
android:orientation="vertical"
android:weightSum="1"></LinearLayout>
<ImageView
android:id="#+id/imagePreview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ImageView
android:id="#+id/playButton"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="center"
android:src="#drawable/play_big" />
<ImageView
android:id="#+id/pauseButton"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="center"
android:src="#drawable/pause_white" />
<ImageView
android:id="#+id/playMain"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="center"
android:src="#drawable/play" />
<ImageView
android:id="#+id/replay"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="center"
android:src="#drawable/replay" />
<LinearLayout
android:id="#+id/belowPlayButton"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:orientation="vertical"
android:layout_alignParentBottom="true"></LinearLayout>
</RelativeLayout>
</FrameLayout>
<LinearLayout
android:id="#+id/desc_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="#color/colorPrimary"
android:orientation="horizontal">
<TextView
android:id="#+id/desc"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:maxLines="100"
android:padding="10dp"
android:text="Description"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#color/textcolor"
android:textSize="20sp" />
</LinearLayout>
</LinearLayout>
-->
-->
<FrameLayout
android:id="#+id/listLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.widget.SwipeRefreshLayout
android:id="#+id/refresh"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
app:paddingStart="20dp">
<android.support.v7.widget.RecyclerView
android:id="#+id/videoRecyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="150dp"
android:paddingTop="8dp"
android:clipToPadding="false"
android:scrollbars="vertical"/>
</android.support.v4.widget.SwipeRefreshLayout>
</FrameLayout>