0

I want to create a recyleview Layout with 2 columns. There should be a variable that has 2 columns in them.Clicking on them should bring up a toast message

0

1 Answer 1

0

Add a GridLayoutManager to your recyclerview when you set it up with adapter etc, like this:

recyclerview.setLayoutManager(new GridLayoutManager(context, 2));

The 2 is the number of columns. To be clear if you are a beginner, the context param can usually be changed to "this" or getContext() since you usually set the recyclerview up in an activity.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.