Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It seems that .margin or margin has no use. #38

Open
tinybright opened this issue May 6, 2016 · 6 comments
Open

It seems that .margin or margin has no use. #38

tinybright opened this issue May 6, 2016 · 6 comments

Comments

@tinybright
Copy link

No description provided.

@csumissu
Copy link

csumissu commented Jun 29, 2016

Yes, I also find this issue for multi view type.

@yqritc
Copy link
Owner

yqritc commented Jun 29, 2016

@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.

@csumissu
Copy link

@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!

@saky0542
Copy link

saky0542 commented Aug 1, 2016

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

@tata8k
Copy link

tata8k commented May 10, 2017

The same problem

@LightSun
Copy link

LightSun commented Jun 6, 2018

i have same problem too. it seem that it have a compat bug of android version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants