I'm working on the app for event. I want to add calendar activity with columns as room, rows as time, and cells as attraction. I tried to use Android Week View package, but it has some limitations (columns as day, cannot set max/min date) and that's why I can't use it.
I'm going to do something like this:

I'm thinking how can I do that. Building on scratch using View class it's too hard for me (and I think exists a better idea). So, can you enlighten me what component could I use? TableView, RecyclerView? I'm looking for a solution with visible only 4 rooms (on smartphones), but by scrolling horizontal you can show more.
Use RecyclerView with GridLayoutManager.
It would be simple if you add RecyclerView in your xml and in java code just say
GridLayoutManager lLayout = new GridLayoutManager(MainActivity.this, NO_OF_COLUMNS);
RecyclerView rView = (RecyclerView)findViewById(R.id.recycler_view);
rView.setHasFixedSize(true);
rView.setLayoutManager(lLayout);
RecyclerViewAdapter rcAdapter = new RecyclerViewAdapter(MainActivity.this, rowListItem);
rView.setAdapter(rcAdapter);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With