It seems that .margin or margin has no use.
tinybright opened this issue · 6 comments
Yes, I also find this issue for multi view type.
@csumissu
I just checked my sample and it works well.
In my sample, ComplexActivity shows margin implementation. Please check ComplexAdapter.
If you cannot solve the problem, please show me your implementation.
@yqritc http://git.oschina.net/csumissu/FakeWeChat
app/src/main/java/csumissu/fakewechat/main/ExploreFragment.java
I use your library as this:
mRecyclerView.addItemDecoration(new HorizontalDividerItemDecoration.Builder(getContext())
.colorResId(R.color.whiteSmoke)
.sizeResId(R.dimen.divider)
.marginResId(R.dimen.tile_divider_margin)
.build());
but it does not work.
I check the ComplexAdapter you mentioned, it seems the same.
Please check it. Thank you!
I have the same problem,it does not work about margin, I use like this:
mRecyclerView.addItemDecoration(new HorizontalDividerItemDecoration.Builder(mContext)
.paintProvider(mQuickAdapter)
.visibilityProvider(mQuickAdapter)
.marginProvider(mQuickAdapter)
.build());
in my adapter:
@OverRide
public int dividerLeftMargin(int position, RecyclerView parent) {
return 50;
}
@Override
public int dividerRightMargin(int position, RecyclerView parent) {
return 0;
}
the LeftMargin does not work well
The same problem
i have same problem too. it seem that it have a compat bug of android version.