Jump to content

[help] Horizontal 7 day calendar layout set up? (image in post)

Hey guys, so I'm trying to create a small calendar that will show say 7 days at the bottom of my activity in android studio and I was just wondering what on screen elements I should be using to make this?

Here is an example of something extremely similar to what I am trying to create (bottom of the UI): https://cdn.segmentnext.com/wp-content/uploads/2015/09/pes-2016-live-screens.jpg

I was thinking about having a frame layout as a container and then I wasn't sure what I would use to create each individual day on the calendar? I want to have each day as a square, with the number in the top left and an image view in the center to display an image if something is happening on that day (exactly like it is in the image). I was thinking maybe have 7 frame layouts within the original containing frame layout, with each of those frame layouts containg a textView and an Image view, would that be the correct way of going about that? or is there a more efficient way to set this up?

Thanks in advance!

Link to comment
Share on other sites

Link to post
Share on other sites

When you need to show a list of repeating elements (such as days in a calendar) you should use a RecyclerView with an adapter.

 

The RecyclerView is the more modern form of the ListView and GridView.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×