RecyclerView last Item does not show entirely the item, because of the above TabLayout












0















I have a RecyclerView that does not show the last item, I know there are a lot of similar posts, but is all the day I am trying to make changes without success in the file, I guess the main reason could be the TabView because without it, it works like a charm. The RecyclerView is called by the include below..



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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="@color/cardViewBackground">

<android.support.design.widget.TabLayout
android:id="@+id/address_filter_tl"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_gravity="start"
android:background="@color/colorPrimary"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tabGravity="fill"
app:tabIndicatorColor="@color/primaryWhite"
app:tabMode="fixed"
app:tabSelectedTextColor="@color/primaryWhite"
app:tabTextColor="@color/inactiveTabText"
android:layout_marginBottom="?attr/actionBarSize">

<android.support.design.widget.TabItem
android:id="@+id/search_results_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/search_result" />

<android.support.design.widget.TabItem
android:id="@+id/address_book_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/address_book" />

</android.support.design.widget.TabLayout>

<android.support.v7.widget.CardView
android:id="@+id/my_location_cv"
android:layout_width="0dp"
android:layout_height="72dp"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:clickable="true"
android:focusable="true"
app:cardElevation="2dp"
app:layout_constraintBottom_toTopOf="@id/search_results_cv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/address_filter_tl">

<android.support.constraint.ConstraintLayout
android:id="@+id/my_location_cl"
android:layout_width="match_parent"
android:layout_height="match_parent">

<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_margin="16dp"
app:layout_constraintBottom_toBottomOf="@id/my_location_cl"
app:layout_constraintStart_toStartOf="@id/my_location_cl"
app:layout_constraintTop_toTopOf="@id/my_location_cl"
app:srcCompat="@drawable/ic_my_location"
tools:ignore="ContentDescription" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="72dp"
android:text="@string/my_location"
android:textColor="@color/primaryBlack"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@id/guideline"
app:layout_constraintStart_toStartOf="parent" />

<TextView
android:id="@+id/my_location_address_tv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="72dp"
android:layout_marginEnd="16dp"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/primaryGreyText"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/guideline"
tools:text="7331 GA Apeldoorn" />

<android.support.constraint.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="36dp" />

</android.support.constraint.ConstraintLayout>

</android.support.v7.widget.CardView>

<include
android:id="@+id/search_results_cv"
layout="@layout/addresses_card_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/my_location_cv" />

<android.support.v7.widget.AppCompatImageView
android:id="@+id/appCompatImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
app:layout_goneMarginBottom="8dp"
android:src="@drawable/powered_by_google"
app:layout_constraintTop_toBottomOf="@id/search_results_cv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

</android.support.constraint.ConstraintLayout>


this is the include content layout:



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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:clipToPadding="false"
android:layout_height="wrap_content">

<android.support.v7.widget.RecyclerView
android:id="@+id/addresses_rv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingTop="0dp"
android:paddingBottom="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:listitem="@layout/address_item" />

</android.support.constraint.ConstraintLayout>









share|improve this question

























  • set your layout_height to 0dp. for your <include

    – Karan Mer
    Nov 19 '18 at 13:15













  • Please attach a screenshot too. It would be more easy to understand

    – Rohit Singh
    Nov 19 '18 at 13:15











  • I cannot attach screenshot sorry:( I apologise, but I can't, basically the last item is not fully visible and you have a view with the a tab layout and a small margin

    – Drocchio
    Nov 19 '18 at 13:16













  • @KaranMer the RecyclerView disappears if I set 0dp in <include and the same if I do it inside RecyclerView I tried these things already

    – Drocchio
    Nov 19 '18 at 13:21













  • is there any special reason you are including your recyclerview in a separate layout? can't you just add it directly to your xml?

    – Karan Mer
    Nov 19 '18 at 13:23
















0















I have a RecyclerView that does not show the last item, I know there are a lot of similar posts, but is all the day I am trying to make changes without success in the file, I guess the main reason could be the TabView because without it, it works like a charm. The RecyclerView is called by the include below..



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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="@color/cardViewBackground">

<android.support.design.widget.TabLayout
android:id="@+id/address_filter_tl"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_gravity="start"
android:background="@color/colorPrimary"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tabGravity="fill"
app:tabIndicatorColor="@color/primaryWhite"
app:tabMode="fixed"
app:tabSelectedTextColor="@color/primaryWhite"
app:tabTextColor="@color/inactiveTabText"
android:layout_marginBottom="?attr/actionBarSize">

<android.support.design.widget.TabItem
android:id="@+id/search_results_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/search_result" />

<android.support.design.widget.TabItem
android:id="@+id/address_book_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/address_book" />

</android.support.design.widget.TabLayout>

<android.support.v7.widget.CardView
android:id="@+id/my_location_cv"
android:layout_width="0dp"
android:layout_height="72dp"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:clickable="true"
android:focusable="true"
app:cardElevation="2dp"
app:layout_constraintBottom_toTopOf="@id/search_results_cv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/address_filter_tl">

<android.support.constraint.ConstraintLayout
android:id="@+id/my_location_cl"
android:layout_width="match_parent"
android:layout_height="match_parent">

<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_margin="16dp"
app:layout_constraintBottom_toBottomOf="@id/my_location_cl"
app:layout_constraintStart_toStartOf="@id/my_location_cl"
app:layout_constraintTop_toTopOf="@id/my_location_cl"
app:srcCompat="@drawable/ic_my_location"
tools:ignore="ContentDescription" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="72dp"
android:text="@string/my_location"
android:textColor="@color/primaryBlack"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@id/guideline"
app:layout_constraintStart_toStartOf="parent" />

<TextView
android:id="@+id/my_location_address_tv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="72dp"
android:layout_marginEnd="16dp"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/primaryGreyText"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/guideline"
tools:text="7331 GA Apeldoorn" />

<android.support.constraint.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="36dp" />

</android.support.constraint.ConstraintLayout>

</android.support.v7.widget.CardView>

<include
android:id="@+id/search_results_cv"
layout="@layout/addresses_card_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/my_location_cv" />

<android.support.v7.widget.AppCompatImageView
android:id="@+id/appCompatImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
app:layout_goneMarginBottom="8dp"
android:src="@drawable/powered_by_google"
app:layout_constraintTop_toBottomOf="@id/search_results_cv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

</android.support.constraint.ConstraintLayout>


this is the include content layout:



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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:clipToPadding="false"
android:layout_height="wrap_content">

<android.support.v7.widget.RecyclerView
android:id="@+id/addresses_rv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingTop="0dp"
android:paddingBottom="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:listitem="@layout/address_item" />

</android.support.constraint.ConstraintLayout>









share|improve this question

























  • set your layout_height to 0dp. for your <include

    – Karan Mer
    Nov 19 '18 at 13:15













  • Please attach a screenshot too. It would be more easy to understand

    – Rohit Singh
    Nov 19 '18 at 13:15











  • I cannot attach screenshot sorry:( I apologise, but I can't, basically the last item is not fully visible and you have a view with the a tab layout and a small margin

    – Drocchio
    Nov 19 '18 at 13:16













  • @KaranMer the RecyclerView disappears if I set 0dp in <include and the same if I do it inside RecyclerView I tried these things already

    – Drocchio
    Nov 19 '18 at 13:21













  • is there any special reason you are including your recyclerview in a separate layout? can't you just add it directly to your xml?

    – Karan Mer
    Nov 19 '18 at 13:23














0












0








0








I have a RecyclerView that does not show the last item, I know there are a lot of similar posts, but is all the day I am trying to make changes without success in the file, I guess the main reason could be the TabView because without it, it works like a charm. The RecyclerView is called by the include below..



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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="@color/cardViewBackground">

<android.support.design.widget.TabLayout
android:id="@+id/address_filter_tl"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_gravity="start"
android:background="@color/colorPrimary"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tabGravity="fill"
app:tabIndicatorColor="@color/primaryWhite"
app:tabMode="fixed"
app:tabSelectedTextColor="@color/primaryWhite"
app:tabTextColor="@color/inactiveTabText"
android:layout_marginBottom="?attr/actionBarSize">

<android.support.design.widget.TabItem
android:id="@+id/search_results_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/search_result" />

<android.support.design.widget.TabItem
android:id="@+id/address_book_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/address_book" />

</android.support.design.widget.TabLayout>

<android.support.v7.widget.CardView
android:id="@+id/my_location_cv"
android:layout_width="0dp"
android:layout_height="72dp"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:clickable="true"
android:focusable="true"
app:cardElevation="2dp"
app:layout_constraintBottom_toTopOf="@id/search_results_cv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/address_filter_tl">

<android.support.constraint.ConstraintLayout
android:id="@+id/my_location_cl"
android:layout_width="match_parent"
android:layout_height="match_parent">

<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_margin="16dp"
app:layout_constraintBottom_toBottomOf="@id/my_location_cl"
app:layout_constraintStart_toStartOf="@id/my_location_cl"
app:layout_constraintTop_toTopOf="@id/my_location_cl"
app:srcCompat="@drawable/ic_my_location"
tools:ignore="ContentDescription" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="72dp"
android:text="@string/my_location"
android:textColor="@color/primaryBlack"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@id/guideline"
app:layout_constraintStart_toStartOf="parent" />

<TextView
android:id="@+id/my_location_address_tv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="72dp"
android:layout_marginEnd="16dp"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/primaryGreyText"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/guideline"
tools:text="7331 GA Apeldoorn" />

<android.support.constraint.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="36dp" />

</android.support.constraint.ConstraintLayout>

</android.support.v7.widget.CardView>

<include
android:id="@+id/search_results_cv"
layout="@layout/addresses_card_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/my_location_cv" />

<android.support.v7.widget.AppCompatImageView
android:id="@+id/appCompatImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
app:layout_goneMarginBottom="8dp"
android:src="@drawable/powered_by_google"
app:layout_constraintTop_toBottomOf="@id/search_results_cv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

</android.support.constraint.ConstraintLayout>


this is the include content layout:



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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:clipToPadding="false"
android:layout_height="wrap_content">

<android.support.v7.widget.RecyclerView
android:id="@+id/addresses_rv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingTop="0dp"
android:paddingBottom="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:listitem="@layout/address_item" />

</android.support.constraint.ConstraintLayout>









share|improve this question
















I have a RecyclerView that does not show the last item, I know there are a lot of similar posts, but is all the day I am trying to make changes without success in the file, I guess the main reason could be the TabView because without it, it works like a charm. The RecyclerView is called by the include below..



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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="@color/cardViewBackground">

<android.support.design.widget.TabLayout
android:id="@+id/address_filter_tl"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_gravity="start"
android:background="@color/colorPrimary"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tabGravity="fill"
app:tabIndicatorColor="@color/primaryWhite"
app:tabMode="fixed"
app:tabSelectedTextColor="@color/primaryWhite"
app:tabTextColor="@color/inactiveTabText"
android:layout_marginBottom="?attr/actionBarSize">

<android.support.design.widget.TabItem
android:id="@+id/search_results_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/search_result" />

<android.support.design.widget.TabItem
android:id="@+id/address_book_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/address_book" />

</android.support.design.widget.TabLayout>

<android.support.v7.widget.CardView
android:id="@+id/my_location_cv"
android:layout_width="0dp"
android:layout_height="72dp"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:clickable="true"
android:focusable="true"
app:cardElevation="2dp"
app:layout_constraintBottom_toTopOf="@id/search_results_cv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/address_filter_tl">

<android.support.constraint.ConstraintLayout
android:id="@+id/my_location_cl"
android:layout_width="match_parent"
android:layout_height="match_parent">

<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_margin="16dp"
app:layout_constraintBottom_toBottomOf="@id/my_location_cl"
app:layout_constraintStart_toStartOf="@id/my_location_cl"
app:layout_constraintTop_toTopOf="@id/my_location_cl"
app:srcCompat="@drawable/ic_my_location"
tools:ignore="ContentDescription" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="72dp"
android:text="@string/my_location"
android:textColor="@color/primaryBlack"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@id/guideline"
app:layout_constraintStart_toStartOf="parent" />

<TextView
android:id="@+id/my_location_address_tv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="72dp"
android:layout_marginEnd="16dp"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/primaryGreyText"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/guideline"
tools:text="7331 GA Apeldoorn" />

<android.support.constraint.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="36dp" />

</android.support.constraint.ConstraintLayout>

</android.support.v7.widget.CardView>

<include
android:id="@+id/search_results_cv"
layout="@layout/addresses_card_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/my_location_cv" />

<android.support.v7.widget.AppCompatImageView
android:id="@+id/appCompatImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
app:layout_goneMarginBottom="8dp"
android:src="@drawable/powered_by_google"
app:layout_constraintTop_toBottomOf="@id/search_results_cv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

</android.support.constraint.ConstraintLayout>


this is the include content layout:



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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:clipToPadding="false"
android:layout_height="wrap_content">

<android.support.v7.widget.RecyclerView
android:id="@+id/addresses_rv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingTop="0dp"
android:paddingBottom="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:listitem="@layout/address_item" />

</android.support.constraint.ConstraintLayout>






android android-layout android-recyclerview android-constraintlayout recyclerview-layout






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 19 '18 at 13:15







Drocchio

















asked Nov 19 '18 at 13:06









DrocchioDrocchio

87110




87110













  • set your layout_height to 0dp. for your <include

    – Karan Mer
    Nov 19 '18 at 13:15













  • Please attach a screenshot too. It would be more easy to understand

    – Rohit Singh
    Nov 19 '18 at 13:15











  • I cannot attach screenshot sorry:( I apologise, but I can't, basically the last item is not fully visible and you have a view with the a tab layout and a small margin

    – Drocchio
    Nov 19 '18 at 13:16













  • @KaranMer the RecyclerView disappears if I set 0dp in <include and the same if I do it inside RecyclerView I tried these things already

    – Drocchio
    Nov 19 '18 at 13:21













  • is there any special reason you are including your recyclerview in a separate layout? can't you just add it directly to your xml?

    – Karan Mer
    Nov 19 '18 at 13:23



















  • set your layout_height to 0dp. for your <include

    – Karan Mer
    Nov 19 '18 at 13:15













  • Please attach a screenshot too. It would be more easy to understand

    – Rohit Singh
    Nov 19 '18 at 13:15











  • I cannot attach screenshot sorry:( I apologise, but I can't, basically the last item is not fully visible and you have a view with the a tab layout and a small margin

    – Drocchio
    Nov 19 '18 at 13:16













  • @KaranMer the RecyclerView disappears if I set 0dp in <include and the same if I do it inside RecyclerView I tried these things already

    – Drocchio
    Nov 19 '18 at 13:21













  • is there any special reason you are including your recyclerview in a separate layout? can't you just add it directly to your xml?

    – Karan Mer
    Nov 19 '18 at 13:23

















set your layout_height to 0dp. for your <include

– Karan Mer
Nov 19 '18 at 13:15







set your layout_height to 0dp. for your <include

– Karan Mer
Nov 19 '18 at 13:15















Please attach a screenshot too. It would be more easy to understand

– Rohit Singh
Nov 19 '18 at 13:15





Please attach a screenshot too. It would be more easy to understand

– Rohit Singh
Nov 19 '18 at 13:15













I cannot attach screenshot sorry:( I apologise, but I can't, basically the last item is not fully visible and you have a view with the a tab layout and a small margin

– Drocchio
Nov 19 '18 at 13:16







I cannot attach screenshot sorry:( I apologise, but I can't, basically the last item is not fully visible and you have a view with the a tab layout and a small margin

– Drocchio
Nov 19 '18 at 13:16















@KaranMer the RecyclerView disappears if I set 0dp in <include and the same if I do it inside RecyclerView I tried these things already

– Drocchio
Nov 19 '18 at 13:21







@KaranMer the RecyclerView disappears if I set 0dp in <include and the same if I do it inside RecyclerView I tried these things already

– Drocchio
Nov 19 '18 at 13:21















is there any special reason you are including your recyclerview in a separate layout? can't you just add it directly to your xml?

– Karan Mer
Nov 19 '18 at 13:23





is there any special reason you are including your recyclerview in a separate layout? can't you just add it directly to your xml?

– Karan Mer
Nov 19 '18 at 13:23












1 Answer
1






active

oldest

votes


















1














change your include xml as below, set layout_height="0dp" and also set bottom constraint for it. Check if it works.



<include
android:id="@+id/search_results_cv"
layout="@layout/addresses_card_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/my_location_cv"
app:layout_constraintBottom_toBottomOf="parent" />





share|improve this answer
























  • you saved my day, thank you

    – Drocchio
    Nov 19 '18 at 13:31






  • 1





    glad it worked for you.

    – Karan Mer
    Nov 19 '18 at 13:31











  • the problem is that now cannot see the widget below include

    – Drocchio
    Nov 20 '18 at 9:52











  • you will need to change your constraint bottom to top of view you have added.

    – Karan Mer
    Nov 20 '18 at 9:59











  • mmh if I set app:layout_constraintBottom_toTopOf="@+id/appCompatImageView" this last view appears on top because is constrained app:layout_constraintTop_toBottomOf="@id/search_results_cv" and I am afraid my use case is quite complex

    – Drocchio
    Nov 20 '18 at 10:27













Your Answer






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

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

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

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


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53375319%2frecyclerview-last-item-does-not-show-entirely-the-item-because-of-the-above-tab%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














change your include xml as below, set layout_height="0dp" and also set bottom constraint for it. Check if it works.



<include
android:id="@+id/search_results_cv"
layout="@layout/addresses_card_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/my_location_cv"
app:layout_constraintBottom_toBottomOf="parent" />





share|improve this answer
























  • you saved my day, thank you

    – Drocchio
    Nov 19 '18 at 13:31






  • 1





    glad it worked for you.

    – Karan Mer
    Nov 19 '18 at 13:31











  • the problem is that now cannot see the widget below include

    – Drocchio
    Nov 20 '18 at 9:52











  • you will need to change your constraint bottom to top of view you have added.

    – Karan Mer
    Nov 20 '18 at 9:59











  • mmh if I set app:layout_constraintBottom_toTopOf="@+id/appCompatImageView" this last view appears on top because is constrained app:layout_constraintTop_toBottomOf="@id/search_results_cv" and I am afraid my use case is quite complex

    – Drocchio
    Nov 20 '18 at 10:27


















1














change your include xml as below, set layout_height="0dp" and also set bottom constraint for it. Check if it works.



<include
android:id="@+id/search_results_cv"
layout="@layout/addresses_card_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/my_location_cv"
app:layout_constraintBottom_toBottomOf="parent" />





share|improve this answer
























  • you saved my day, thank you

    – Drocchio
    Nov 19 '18 at 13:31






  • 1





    glad it worked for you.

    – Karan Mer
    Nov 19 '18 at 13:31











  • the problem is that now cannot see the widget below include

    – Drocchio
    Nov 20 '18 at 9:52











  • you will need to change your constraint bottom to top of view you have added.

    – Karan Mer
    Nov 20 '18 at 9:59











  • mmh if I set app:layout_constraintBottom_toTopOf="@+id/appCompatImageView" this last view appears on top because is constrained app:layout_constraintTop_toBottomOf="@id/search_results_cv" and I am afraid my use case is quite complex

    – Drocchio
    Nov 20 '18 at 10:27
















1












1








1







change your include xml as below, set layout_height="0dp" and also set bottom constraint for it. Check if it works.



<include
android:id="@+id/search_results_cv"
layout="@layout/addresses_card_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/my_location_cv"
app:layout_constraintBottom_toBottomOf="parent" />





share|improve this answer













change your include xml as below, set layout_height="0dp" and also set bottom constraint for it. Check if it works.



<include
android:id="@+id/search_results_cv"
layout="@layout/addresses_card_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/my_location_cv"
app:layout_constraintBottom_toBottomOf="parent" />






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 19 '18 at 13:30









Karan MerKaran Mer

4,88032864




4,88032864













  • you saved my day, thank you

    – Drocchio
    Nov 19 '18 at 13:31






  • 1





    glad it worked for you.

    – Karan Mer
    Nov 19 '18 at 13:31











  • the problem is that now cannot see the widget below include

    – Drocchio
    Nov 20 '18 at 9:52











  • you will need to change your constraint bottom to top of view you have added.

    – Karan Mer
    Nov 20 '18 at 9:59











  • mmh if I set app:layout_constraintBottom_toTopOf="@+id/appCompatImageView" this last view appears on top because is constrained app:layout_constraintTop_toBottomOf="@id/search_results_cv" and I am afraid my use case is quite complex

    – Drocchio
    Nov 20 '18 at 10:27





















  • you saved my day, thank you

    – Drocchio
    Nov 19 '18 at 13:31






  • 1





    glad it worked for you.

    – Karan Mer
    Nov 19 '18 at 13:31











  • the problem is that now cannot see the widget below include

    – Drocchio
    Nov 20 '18 at 9:52











  • you will need to change your constraint bottom to top of view you have added.

    – Karan Mer
    Nov 20 '18 at 9:59











  • mmh if I set app:layout_constraintBottom_toTopOf="@+id/appCompatImageView" this last view appears on top because is constrained app:layout_constraintTop_toBottomOf="@id/search_results_cv" and I am afraid my use case is quite complex

    – Drocchio
    Nov 20 '18 at 10:27



















you saved my day, thank you

– Drocchio
Nov 19 '18 at 13:31





you saved my day, thank you

– Drocchio
Nov 19 '18 at 13:31




1




1





glad it worked for you.

– Karan Mer
Nov 19 '18 at 13:31





glad it worked for you.

– Karan Mer
Nov 19 '18 at 13:31













the problem is that now cannot see the widget below include

– Drocchio
Nov 20 '18 at 9:52





the problem is that now cannot see the widget below include

– Drocchio
Nov 20 '18 at 9:52













you will need to change your constraint bottom to top of view you have added.

– Karan Mer
Nov 20 '18 at 9:59





you will need to change your constraint bottom to top of view you have added.

– Karan Mer
Nov 20 '18 at 9:59













mmh if I set app:layout_constraintBottom_toTopOf="@+id/appCompatImageView" this last view appears on top because is constrained app:layout_constraintTop_toBottomOf="@id/search_results_cv" and I am afraid my use case is quite complex

– Drocchio
Nov 20 '18 at 10:27







mmh if I set app:layout_constraintBottom_toTopOf="@+id/appCompatImageView" this last view appears on top because is constrained app:layout_constraintTop_toBottomOf="@id/search_results_cv" and I am afraid my use case is quite complex

– Drocchio
Nov 20 '18 at 10:27




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


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

But avoid



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

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


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




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53375319%2frecyclerview-last-item-does-not-show-entirely-the-item-because-of-the-above-tab%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Guess what letter conforming each word

Port of Spain

Run scheduled task as local user group (not BUILTIN)