【发布时间】:2020-08-07 12:26:29
【问题描述】:
和两个朋友一起学习 android,现在我们只关注 UI 部分。一位朋友给了我们创建带有虚线分隔线的显示的任务。我们正在尝试将它添加到适配器文件中,以便可以将它作为回收器视图的一部分加载到我们的片段中,但无法弄清楚如何。
这是虚线drawable传入的布局
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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="match_parent">
<ImageView
android:id="@+id/dashes"
android:background="@drawable/dashes_line"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
【问题讨论】:
标签: android kotlin android-recyclerview rx-kotlin data-class