java - RecyclerView 添加分隔线
问题描述
我的活动有一个RecyclerView
. 请看图片。分开
的2 个部分。RecyclerView
第一部分是俯视图。只是展示一些关于应用程序的价值。第二部分是日历。我想添加行来检查栏是否达到目标。只有第二部分有分隔线我尝试了很多方法,但我无法将该行添加到第二部分。
<?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="@drawable/gray_bg"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/history_norm_delimiter" />
<ImageView
android:id="@+id/imageView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/history_norm_delimiter" />
<ImageView
android:id="@+id/imageView10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/history_norm_delimiter" />
<ImageView
android:id="@+id/imageView9"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/history_norm_delimiter" />
<ImageView
android:id="@+id/imageView8"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/history_norm_delimiter" />
<ImageView
android:id="@+id/imageView7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/history_norm_delimiter" />
<ImageView
android:id="@+id/imageView6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/history_norm_delimiter" />
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/recycleView"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
图像视图是分隔线。但它不在RecyclerView
. 我想将它添加到RecyclerView
.
解决方案
推荐阅读
- r - Column mean, variance and boolean mutation with multiple conditions in R
- jquery - 用单列警告表的单击行的值
- generics - 当泛型类型受泛型生命周期限制时,这意味着什么?
- c# - 显示调用 SaveChanges() 时 Entity Framework Core for PostgreSQL 生成的数据库查询
- terraform - Terraform 复杂类型值不起作用
- typo3 - TYPO3 GIFBUILDER 带有来自 FLUID 的图像
- c - gtk 是否支持使用 gstreamer 显示多个视频?
- ssl - 带有 SSL 的端口 8765 的 NGINX 反向代理不起作用
- python - 哪种方式最好读取镶木地板文件以作为 dask 数据帧处理
- performance - 有没有办法在读取多个文件时并行化 spark.read.load(string*) ?