【发布时间】:2019-04-11 09:52:40
【问题描述】:
所以,我有这个问题。我的最后一项 recyclerview 被我的底部导航覆盖。底部导航处于活动状态。 recyclerview 在片段中。我没有找到答案。
这是我的片段布局,其中包含回收站视图
<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="wrap_content"
tools:context=".PromoFragment">
<!-- TODO: Update blank fragment layout -->
<android.support.v7.widget.RecyclerView
android:id="@+id/promo_recyclerview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginBottom="110dp">
</android.support.v7.widget.RecyclerView>
</android.support.constraint.ConstraintLayout>
这是我在 recyclerview 中使用的项目布局
<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="wrap_content"
android:orientation="vertical"
android:padding="5px">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:id="@+id/card_pertama"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<include layout="@layout/card_promo_layout"/>
</android.support.v7.widget.CardView>
</android.support.constraint.ConstraintLayout>
这是我的代码结果的图像
【问题讨论】:
标签: android android-recyclerview bottomnavigationview