底部导航视图与RecyclerView的最后一项重叠

底部导航视图与RecyclerView的最后一项重叠,第1张

概述RecyclerView的最后一项被BottomNavigationView覆盖.BottomNavigationView覆盖了描述和时间.framgment_news.xml:这包含我的RecyclerView<android.support.constraint.ConstraintLayout...android:layout_width="match_parent"android:layout_height="match_parent"

RecyclerVIEw的最后一项被BottomNavigationVIEw覆盖. BottomNavigationVIEw覆盖了描述和时间.

framgment_news.xml:这包含我的RecyclerVIEw

<androID.support.constraint.ConstraintLayout ...androID:layout_wIDth="match_parent"androID:layout_height="match_parent"tools:context=".Fragments.NewsFragment"androID:background="#fff"><ImageVIEw    androID:ID="@+ID/imageVIEw" ... /><TextVIEw    androID:ID="@+ID/textVIEw" ... /><TextVIEw    androID:ID="@+ID/textVIEw3" ... /><TextVIEw    androID:ID="@+ID/textVIEw2" ... /><com.mikhaellopez.circularimagevIEw.CircularImageVIEw    androID:ID="@+ID/circularImageVIEw" ... /><androID.support.v7.Widget.RecyclerVIEw    androID:ID="@+ID/recyclerVIEw"    androID:layout_wIDth="match_parent"    androID:layout_height="wrap_content"    androID:layout_margintop="12dp"    app:layout_constrainttop_toBottomOf="@+ID/textVIEw3"    tools:layout_editor_absoluteX="0dp"    androID:scrollbars="vertical"></androID.support.v7.Widget.RecyclerVIEw>

activity_home.xml

<androID.support.constraint.ConstraintLayout ...    androID:layout_wIDth="match_parent"    androID:layout_height="match_parent"    tools:context=".HomeActivity">    <FrameLayout        androID:ID="@+ID/frameContainer"        androID:layout_wIDth="match_parent"        androID:layout_height="0dp"        androID:layout_marginStart="0dp"        androID:layout_margintop="0dp"        androID:layout_marginEnd="0dp"        app:layout_constraintBottom_totopOf="@+ID/vIEw"        app:layout_constraintEnd_toEndOf="parent"        app:layout_constraintStart_toStartOf="parent"        androID:layout_above="@+ID/bottom_navigation_vIEw"        app:layout_constrainttop_totopOf="parent" />    <!--border on top of Bottom Navigation VIEw-->    <VIEw        androID:ID="@+ID/vIEw"        androID:layout_wIDth="match_parent"        androID:layout_height="0.5dp"        androID:background="#616161"        app:layout_constraintBottom_totopOf="@+ID/bottom_navigation_vIEw" />    <androID.support.design.Widget.BottomNavigationVIEw        androID:ID="@+ID/bottom_navigation_vIEw"        androID:layout_wIDth="match_parent"        androID:layout_height="wrap_content"        androID:background="#fff"        app:labelVisibilityMode="unlabeled"        app:layout_constraintBottom_toBottomOf="parent"        app:layout_constraintEnd_toEndOf="parent"        app:layout_constraintStart_toStartOf="parent"        app:menu="@menu/bottom_navigation_menu" /></androID.support.constraint.ConstraintLayout>

The last item of RecyclerView being overlapped by BottomNavigationView

解决方法:

将填充添加到RecyclerVIEw的父布局

<androID.support.constraint.ConstraintLayout ...    androID:layout_wIDth="match_parent"    androID:layout_height="match_parent"    androID:paddingBottom="56dp"    tools:context=".Fragments.NewsFragment"    androID:background="#fff">

并根据材料设计更改BottomNavigationVIEw的高度

<androID.support.design.Widget.BottomNavigationVIEw    androID:ID="@+ID/bottom_navigation_vIEw"    androID:layout_wIDth="match_parent"    androID:layout_height="56dp"    androID:background="#fff"    app:labelVisibilityMode="unlabeled"    app:layout_constraintBottom_toBottomOf="parent"    app:layout_constraintEnd_toEndOf="parent"    app:layout_constraintStart_toStartOf="parent"    app:menu="@menu/bottom_navigation_menu" />
总结

以上是内存溢出为你收集整理的底部导航视图与RecyclerView的最后一项重叠全部内容,希望文章能够帮你解决底部导航视图与RecyclerView的最后一项重叠所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1210164.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-04
下一篇 2022-06-04

发表评论

登录后才能评论

评论列表(0条)

保存