小编ant*_*tsa的帖子

XML/android: How to make white underline for RecyclerView Item?

I need to make a little white line under my every recycler view item (from left to right corner), not for any particular element in that item, but for the whole item. (that way it's easier for a user to see which elements are in this particular item, and where another item starts)

Here is my item layout:

<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="@dimen/_5sdp"
    app:cardCornerRadius="0dp"
    app:cardElevation="0dp">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/colorPrimaryDark">

        <TextView
            android:id="@+id/nameView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Mike"
            android:textColor="@color/colorAccent"
            android:textSize="@dimen/_21sdp" …
Run Code Online (Sandbox Code Playgroud)

xml android view android-recyclerview

0
推荐指数
1
解决办法
120
查看次数

标签 统计

android ×1

android-recyclerview ×1

view ×1

xml ×1