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

FixedGridLayoutManager vertical scroll issue #29

Open
rsatandroid opened this issue Jan 2, 2017 · 1 comment
Open

FixedGridLayoutManager vertical scroll issue #29

rsatandroid opened this issue Jan 2, 2017 · 1 comment

Comments

@rsatandroid
Copy link

Hi All,
I was playing around FixedGridLayoutManager and tried to have a RecyclerView with FixedGridLayoutManager as an item of RecyclerView with LinearLayoutManager (Vertical).

The problem is now the RecyclerView with FixedGridLayoutManager does not scroll vertically.
ViewHolder for parent RecyclerView with LinearLayoutManager is as follows -

public static class VerticalItemHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
private SimpleTVAdapter mAdapter;
private RecyclerView recyclerView;
private TextView sectionTitle;

    public VerticalItemHolder(View itemView, SimpleTVAdapter adapter) {
        super(itemView);
        itemView.setOnClickListener(this);

        mAdapter = adapter;
        recyclerView = (RecyclerView) itemView.findViewById(R.id.tv_list);
        sectionTitle = (TextView) itemView.findViewById(R.id.sectionTitle);
    }

    @Override
    public void onClick(View v) {
        mAdapter.onItemHolderClick(this);
    }

    public void setSectionTitle(CharSequence text) {
        this.sectionTitle.setText(text);
    }

    public void setUpRecyclerViewItem(FixedGridLayoutManager manager,
                                      SimpleAdapter mAdapter, DividerDecoration dividerDecoration) {
        manager.setTotalColumnCount(10);
        recyclerView.setLayoutManager(manager);
        recyclerView.addItemDecoration(dividerDecoration);
        mAdapter.setItemCount(60);
        recyclerView.setAdapter(mAdapter);

    }
}

Can anyone point me in right direction how to achieve RecyclerView (FixedGrid) as an item inside another RecyclerView (Linear Vertical)?

Thank you.

@rsatandroid
Copy link
Author

PS : FixedGridLayoutManager scrollVerticallyBy is not getting called while scrolling vertically.

is it possible that top LinearLayoutManager is consuming the scrollVerticallyBy ?

setNestedScrollingEnabled on parent RecyclerView is also not making any scrolling behaviour change.

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

1 participant