[英]How to put a TextView over RecyclerView items in Android?
As shown in below image I made it with RecyclerView .如下图所示,我使用RecyclerView制作了它。
I want approach to a solution to add a TextView that is shown over the RecyclerView items like the image below.我想要一种解决方案来添加一个 TextView,它显示在 RecyclerView 项目上,如下图所示。
As you can see this TextView is laid on over two or more items of RecyclerView, so how I can achieve this?如您所见,这个 TextView 放置在两个或多个 RecyclerView 上,那么我该如何实现呢?
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Appointment made 8.15-9.15"
android:textSize="20sp"
android:textStyle="bold"
android:background="@android:color/holo_green_light"
android:textColor="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
add this to your activity layout.xml file above recycler view.将此添加到您的活动布局中。xml 文件在回收站视图上方。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.