我正在尝试为DividerItemDecoration设置我的自定义drawable(行),但没有成功.哪里出错了?
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(getContext(),
LinearLayoutManager.VERTICAL);
dividerItemDecoration.setDrawable(getContext().getResources().getDrawable(R.drawable.sk_line_divider));
Run Code Online (Sandbox Code Playgroud)
XML形状:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<stroke
android:width="1dp"
android:color="#000000">
</stroke>
</shape>
Run Code Online (Sandbox Code Playgroud) 我有一些具有自己实现的控制器类。是否可以在视图组中将一个视图插入另一个视图?