.marginResId(R.dimen.leftmargin, R.dimen.rightmargin) has error
chenxi0203 opened this issue · 3 comments
chenxi0203 commented
chenxi0203 commented
HorizontalDividerItemDecoration decoration = new HorizontalDividerItemDecoration.Builder(this)
.drawable(R.drawable.ic_list_divider)
.showLastDivider()
.marginResId(R.dimen.dp_15, 0)
.build();
mRecyclerView.addItemDecoration(decoration);
liwei49699 commented
.marginResId(R.dimen.dp_15, 0)
0 -->R.dimen.dp_0
balkarov commented
Check your dimens.xml. You all dimen shoud have dp
For example:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="leftmargin">8dp</dimen>
<dimen name="rightmargin">0dp</dimen>
</resources>