Weekly Calendar Android Studio Tutorial | Daily Events List

  Рет қаралды 73,204

Code With Cal

Code With Cal

Күн бұрын

How to create a weekly calendar view using Android Studio and Java. In this example project we convert our monthly calendar view into a weekly calendar view.
We also add in the ability to add daily events to our calendar. The events are then displayed in list view. Our list view will update with the events which are happening on that day.
Part 1 Monthly Calendar tutorial:
• Calendar App Example A...
Part 3 Daily Calendar View:
• Daily Calendar View An...
Monthly Calendar Source Code:
github.com/codeWithCal/Calend...
Weekly Calendar Source Code:
github.com/codeWithCal/Calend...
Date Picker Tutorial:
• Pop Up Date Picker And...
Time Picker Tutorial:
• Pop Up Time Picker And...
⏱️ TIMESTAMPS ⏱️
00:00 - Intro
00:22 - Weekly calendar view
06:51 - Highlight selected date
07:53 - Daily event list
#CalendarAppTutorial #LearnAndroidStudio #AppDevelopment

Пікірлер: 117
@CodeWithCal
@CodeWithCal 2 жыл бұрын
Daily Calendar kzfaq.info/get/bejne/d8-XbJylks2yoYE.html
@Marc-gm4xz
@Marc-gm4xz 3 жыл бұрын
first time i'm using 0.75x speed on youtube
@gshoemake3452
@gshoemake3452 2 жыл бұрын
For real dude. He talks over a sped up recording of him coding, so there's no way to keep up all. I just watch the video now to see how it's executed then write it myself
@GIULI4994
@GIULI4994 Жыл бұрын
same here
@mohammadabbasabidi
@mohammadabbasabidi Жыл бұрын
Damn i was thinking to comment down the same but then u thought it would be rude but I'm not alone who thinks he's way too fast
@ajak7870
@ajak7870 3 жыл бұрын
Thank you so much for this tutorial!!!! Everything was so easy to understand😍. I was struggling with making calendar and your video literally saved me. Thank you so muchhh!!!
@CodeWithCal
@CodeWithCal 3 жыл бұрын
You are most welcome ☺️
@inhle9479
@inhle9479 3 жыл бұрын
Thank you for your video , I really appreciate it
@CodeWithCal
@CodeWithCal 3 жыл бұрын
You are most welcome 🙂
@timlarsson7556
@timlarsson7556 3 жыл бұрын
This is amazing, so glad i found this! Great video and great speed
@CodeWithCal
@CodeWithCal 3 жыл бұрын
♥️
@rachelwielgopolski0609
@rachelwielgopolski0609 10 ай бұрын
how would you add some sort of icon to the weekly view? so that you can see which days have events without clicking each one?
@mercn
@mercn 11 ай бұрын
bro your videos are great
@jcel_entertainment
@jcel_entertainment 2 жыл бұрын
hi cal, can you help me how to only change the color of the clicked week please
@aaminasajid9853
@aaminasajid9853 3 жыл бұрын
can you please tell me that how to add dark mode(that can be set by user or it should be adapt to whatever theme user has as default???
@avivaishnav8478
@avivaishnav8478 2 жыл бұрын
Good learning brother
@user-ke7es2bo4u
@user-ke7es2bo4u 9 ай бұрын
Hello Cal, Very useful tutorial for me. I have one question here, which is how we can add total number of event count inside calendar date or changing background color of specific date. Please suggest me.
@SuperFarhana11
@SuperFarhana11 Жыл бұрын
hi, may i know if it possible for me to start my coding with this video instead of the monthly calendar video? because my desired app does not need the monthly view, it should start with weekly to daily.
@Elmblackbird
@Elmblackbird 2 жыл бұрын
Hey, Nice Explanation. Thank you! Is there a way to set a color for the day once I added an event?
@CodeWithCal
@CodeWithCal 2 жыл бұрын
Yes. The day view is all controlled by the adapter. So add a conditional there to change the BG color :) or something like that
@letiziabre6019
@letiziabre6019 2 жыл бұрын
Hi, awesome content, really appreciate it! How would you edit and/or delete the event?
@CodeWithCal
@CodeWithCal 2 жыл бұрын
This SQLite Database Tutorial is one option kzfaq.info/get/bejne/atFhjbChtJ--nmQ.html
@nmdlyrics9284
@nmdlyrics9284 2 жыл бұрын
Hi, thanks for the tutorial. I'm a newbie and this helped me a lot. Did you happen to leave out the "delete" event button from this tutorial on purpose?
@CodeWithCal
@CodeWithCal 2 жыл бұрын
Hi, Yes I did trying to keep each tutorial as short and to the point as possible. If you are interested in persistent events check out this SQLite database tutorial. kzfaq.info/get/bejne/atFhjbChtJ--nmQ.html
@ken-gg4vr
@ken-gg4vr Жыл бұрын
assume i would to show all days that have event with gray backgound. Example 28,29,30 have event so in calendarview day 28 29 30 should have gray background. Do you have any idea to do that?
@alinawei7010
@alinawei7010 4 ай бұрын
What's the benefits of storing selectedDay in CalendarUtil vs. viewModel?
@vildanvinanda685
@vildanvinanda685 10 ай бұрын
Hi sir, can you help me? I need to add event to my database and I need to show my event in recyclerview. How to creat that?
@namrahabib315
@namrahabib315 Ай бұрын
hello sir....how to save the events in Firebase or SQL lite?
@YO-dd3ot
@YO-dd3ot 2 жыл бұрын
Hey Cal, Can you create Yearly view calendar
@gcancino
@gcancino 2 жыл бұрын
Hey, Cal.. First of all, thanks for this amazing tutorial. I have a question: how do you pass this code into a fragment? I am having a problem with the code below; it's in setWeekView() fun in the Week Activity but when trying to pass into my fragment I don't know how to pass in the second value. CalendarAdapter calendarAdapter = new CalendarAdapter(days, this); As I have been seeing, the second parameter in that function/class is CalendarAdapter.OnItemListener so I don't understand why you passed this into the second parameter. Thanks in advance!
@OverlordBlueflames
@OverlordBlueflames 2 жыл бұрын
change this to requireContext(), it is what i've been using when i switched from activities intent to fragments
@gshoemake3452
@gshoemake3452 2 жыл бұрын
When he built the class, he implements OnItemListener, making the object an OnItemListener. So when he passes in this, its passing in the object which is itself an OnItemListener. Applying this to fragments is quite simple. You implement OnItemListener to the fragment and pass the fragment as an argument.
@Rogorbit
@Rogorbit Жыл бұрын
how to do it?..
@user-jp9lk4su4b
@user-jp9lk4su4b 2 жыл бұрын
Thank you for your Android Studio tutorials! Why when in the adapter add code: if(date.equals(CalendarUtils.selectedDate.now()) holder.dayOfMonth.setTextColor(Color.RED); Then the text of the current date is not highlighted in red? Please tell me my mistake.
@lglf77
@lglf77 2 жыл бұрын
Can you hear me for a different menu calendar? I send an idea
@haffy.886
@haffy.886 Ай бұрын
how can i only keep the weekly view? i don't need the monthly view for my current project. please help me, Ive been trying since few days :')
@jor1944
@jor1944 Жыл бұрын
Aucti9neer. With my respect.
@MilitaryTechnologyChannel
@MilitaryTechnologyChannel 2 жыл бұрын
Hi, really nice video, I have succeed to create the calendar, but have question, how if I would like to put the selectedDate as intent and bring it to another activities? tries to convert it to string but not worked, can you help me?
@CodeWithCal
@CodeWithCal 2 жыл бұрын
You should be able to convert the date to a string using a dateformatter. Then as long as you use the same date formatter when converting the string back into a date on your next intent. In short you are on the right track.
@leventestancz4522
@leventestancz4522 2 жыл бұрын
Hey, how can I set the current date textcolor? I want to separately highlight the current date.
@CodeWithCal
@CodeWithCal 2 жыл бұрын
Hey, Sure thing. In the OnBindViewHolder Similar to how we change the background color if the date equals selected date. Do a check if date equals todays date if so change text to what ever color. :)
@user-pq8zv4mv4r
@user-pq8zv4mv4r 3 жыл бұрын
Thank you for the video. There was no error in the code I made. But only the day of the week came out and the date didn't come out. How do I solve this?
@CodeWithCal
@CodeWithCal 3 жыл бұрын
And you have changed the array list to type Local date from string. The one thats passed into the adapter?
@soonjini6313
@soonjini6313 2 жыл бұрын
I wanted to add a feature where the days that had events listed under them would be annotated/highlighted in some way to let users know that there are events on those days. Any suggestions?
@CodeWithCal
@CodeWithCal 2 жыл бұрын
Thats totally possible and you just need to do it the same way we highlight the selected day
@atianlucho1752
@atianlucho1752 2 жыл бұрын
Hi. Did you solve the problem?
@AmandaThomas-qb3sz
@AmandaThomas-qb3sz Жыл бұрын
@@atianlucho1752 were you able to solve the problem?
@roanknoesen9163
@roanknoesen9163 Жыл бұрын
@@CodeWithCal could you give more info on this please? I have been trying for 2 days now to get this working but I can't seem to figure it out.
@zeintrnalx3947
@zeintrnalx3947 2 жыл бұрын
Hi sir how can I make highlight background local day of month with diferrent color ? thank you
@CodeWithCal
@CodeWithCal 2 жыл бұрын
In the adapter if date is equal to the current date change bg color to whatever. exactly the same as how we set selected date background color
@BomberosCS
@BomberosCS 2 жыл бұрын
hi cal I wrote the code the same as on the film, but it does not save events to specific days, only to all of them
@CodeWithCal
@CodeWithCal 2 жыл бұрын
Worth double checking when we set the new events date what is being used. Try adding a break point and seeing what the value is :)
@lansoe113
@lansoe113 2 жыл бұрын
Hello sir I am trying to use your code but I keep getting a null object reference error at monthYearFromDate do you know how to fix this?
@CodeWithCal
@CodeWithCal 2 жыл бұрын
Is the date null when you are calling date monthyearfromdate? I would put in a break point, before this method is called and see the state of things. For a long time I ignored debug mode and breakpoints. But they really can save so much time.
@sejalyadav6730
@sejalyadav6730 2 жыл бұрын
hey, im facing some issue..the dates in the main activity layout are not visible..everything else the weekdays are visible and the previousweek and nextweek buttons are working fine..just the dates are not visible
@CodeWithCal
@CodeWithCal 2 жыл бұрын
Hmm could be a number of things, double check your xml and if you don't see anything off in there try putting a break point in the adapter and check why date textview is not being populated.
@radzs9939
@radzs9939 4 ай бұрын
Hi I have managed to do your tutorial. The applications runs, however when I select the Weekly Text on top my application crashes. Can you please help with this issue?
@radzs9939
@radzs9939 4 ай бұрын
I did my digging and found out that the WeekViewActivity cannot be accessed. When you press the weekly button, it immediately crashes.
@atianlucho1752
@atianlucho1752 2 жыл бұрын
Hi cal I'm making a calendar with the video you uploaded. I want to change the date to Red when the event is added. I tried to do it in the same way as selected day, but it didn't work out. ArrayList dailyEvents = Event.eventsForDate(CalendarUtils.selectedDate); ... If (dailyEvents.size()>0){ //make red} all dates change to Red. I think we need to get information on the date the event was added, but there's no progress
@Sposhal
@Sposhal 2 жыл бұрын
how to show the days of the week for Example December 4 2021 Saturday
@CodeWithCal
@CodeWithCal 2 жыл бұрын
I think you can use a different date formatter. If you Google local dateformatter you should be able to see all the different combinations of date formatters you can use
@eoghanfeighery7383
@eoghanfeighery7383 Жыл бұрын
Would this also allow for timed reminders for events?
@siddharthagarwal7409
@siddharthagarwal7409 2 жыл бұрын
Now understood why youtube has given 0.75x speed option
@joshuatan5841
@joshuatan5841 2 жыл бұрын
Anyone knows if this can be done on Minimum SDK Lollipop?
@CodeWithCal
@CodeWithCal 2 жыл бұрын
You can absolutely! You just won't have access to LocalDates which have a lot of convenience methods. But you can use just a regular dates. your methods will need to be a bit longer as there is a little more logic you will have to be responsible for
@ibrahimujeremia42
@ibrahimujeremia42 3 жыл бұрын
where is that tutorial of monthly calender view..... i mean that previous tutorial
@CodeWithCal
@CodeWithCal 3 жыл бұрын
kzfaq.info/get/bejne/eMdghJCUsJfKeqM.html
@syedtanzil5538
@syedtanzil5538 3 жыл бұрын
can i get a copy of this code? i think I've made typos and am unable to fix em.
@syedtanzil5538
@syedtanzil5538 3 жыл бұрын
It'll be helpful if i can get a reply to this asap
@CodeWithCal
@CodeWithCal 3 жыл бұрын
Link in description👆
@syedtanzil5538
@syedtanzil5538 3 жыл бұрын
@@CodeWithCal thanks
@nicky8428
@nicky8428 2 жыл бұрын
Can you make a Dailyl time record in Android studio?
@CodeWithCal
@CodeWithCal 2 жыл бұрын
kzfaq.info/get/bejne/d8-XbJylks2yoYE.html&ab_channel=CodeWithCal
@memekiniharada9505
@memekiniharada9505 2 жыл бұрын
i think u should explain this video more slowly, but thanks a lot
@CodeWithCal
@CodeWithCal 2 жыл бұрын
Thanks for honest opinion 🙂
@rahmataulia
@rahmataulia 2 жыл бұрын
cool! but your code written in java, is it easy convert to kotlin?
@CodeWithCal
@CodeWithCal 2 жыл бұрын
Yeah it is fairly easy to convert. kotlin is based on java. And if you copy paste java code into your kotlin project Android studio will even try and do the conversion for you. Worth checking though because auto converted code doesn't allways work out.
@rahmataulia
@rahmataulia 2 жыл бұрын
@@CodeWithCal alright thanks for this, ill try 🙏
@gcancino
@gcancino 2 жыл бұрын
@@rahmataulia Could you convert the code in Kotlin? I tried but I am having problems with Calendar Adapter because I am using the Calendar inside a fragment not in an Activity.
@rahmataulia
@rahmataulia 2 жыл бұрын
@@gcancino im never tried convert to kotlin, you should use context in fragment i think
@gcancino
@gcancino 2 жыл бұрын
@@rahmataulia tried but not working
@danielatombir8517
@danielatombir8517 2 жыл бұрын
Do you mind sharing the source code for reference?
@CodeWithCal
@CodeWithCal 2 жыл бұрын
github.com/codeWithCal/CalendarTutorialAndroidStudio/tree/WeeklyCalendar
@ojidelouiedeed.2227
@ojidelouiedeed.2227 3 жыл бұрын
Sir does it have a database?
@CodeWithCal
@CodeWithCal 3 жыл бұрын
Nope I try to keep the scope small. I do have a video on SQlite database. You could combine the two videos: kzfaq.info/get/bejne/atFhjbChtJ--nmQ.html
@ojidelouiedeed.2227
@ojidelouiedeed.2227 3 жыл бұрын
@@CodeWithCal thank you sir new subscriber here please continue im from Philippines
@katpark1733
@katpark1733 3 жыл бұрын
Can you connect this to database or firebase????
@CodeWithCal
@CodeWithCal 3 жыл бұрын
Try combining with this tutorial kzfaq.info/get/bejne/atFhjbChtJ--nmQ.html
@katpark1733
@katpark1733 3 жыл бұрын
@@CodeWithCal hey another question how do you use this with a time picker for the event
@CodeWithCal
@CodeWithCal 3 жыл бұрын
@@katpark1733 kzfaq.info/get/bejne/mZyTZMqat8vPcmg.html
@katpark1733
@katpark1733 3 жыл бұрын
Thank you very much
@Leo_reyes15
@Leo_reyes15 2 жыл бұрын
How to eliminate the events?
@CodeWithCal
@CodeWithCal 2 жыл бұрын
Really depends how you keep events persistent. I have a tutorial on SQLite DBs if you are interested. kzfaq.info/get/bejne/atFhjbChtJ--nmQ.html
@rabbiaanjum9184
@rabbiaanjum9184 3 жыл бұрын
Sir I was following your date picker toturial i have a querry plzzz help me out really need this help plzz Sir if we are implementing two date pickers say d1 and d2 Now we select date for d1 For d2 we have to disable the date of d1 and all the dates before d1 date ....plz help me out how to do thiss I know i have to implement set mindate in d2 and pass d1 in it but i am unable to do so bcz setmindate takes long and i am unable to convert the date of d1 to long plzzz help me out really need to get this done for my final project Waiting for your kind reply thank you...
@CodeWithCal
@CodeWithCal 3 жыл бұрын
Hello, Set min date shouldn't take a long time. So I think you are close. When d1 is set, set d2 min date to be d1 plus one day. Also I don't think you need to convert the date to a long.
@rabbiaanjum9184
@rabbiaanjum9184 3 жыл бұрын
@@CodeWithCal sir what should i pass in setmindate If am am passing the string date of d1 its giving erroe saying it it will only take long ????
@CodeWithCal
@CodeWithCal 3 жыл бұрын
@@rabbiaanjum9184 Apologies you do want to pass a long. create a Date object from day month and year as described here: stackoverflow.com/questions/16499228/creating-java-date-object-from-year-month-day Then you can do something like this: datePickerDialog.getDatePicker().setMinDate(dateObject.getTime());
@rabbiaanjum9184
@rabbiaanjum9184 3 жыл бұрын
@@CodeWithCal sir it is not givig me my desire result Its giving same result as if am passing system.currentTimeMillis in setMinDate i.e todays date
@rabbiaanjum9184
@rabbiaanjum9184 3 жыл бұрын
@@CodeWithCal sir if you have time plz look into my pblm i really need to sort this out as i have my final demo in one day I would be really thankful tou you sir ..
@syedmoinahmed9556
@syedmoinahmed9556 2 жыл бұрын
Using Sharingan to keep up with this tutorial is exhausting tbh..
@TienLenTrinh
@TienLenTrinh 2 жыл бұрын
Why you code kotlin???
@CodeWithCal
@CodeWithCal 2 жыл бұрын
I like both Kotlin and Java :)
@shisuiie2055
@shisuiie2055 2 жыл бұрын
14:09
@AceXT
@AceXT Жыл бұрын
you are so fast, my advice slow your explanation please, not every people force understanding what are you spoken
Daily Calendar View Android Studio Tutorial
11:31
Code With Cal
Рет қаралды 27 М.
哈莉奎因以为小丑不爱她了#joker #cosplay #Harriet Quinn
00:22
佐助与鸣人
Рет қаралды 8 МЛН
Mom's Unique Approach to Teaching Kids Hygiene #shorts
00:16
Fabiosa Stories
Рет қаралды 38 МЛН
JPEG is Dying - And that's a bad thing
8:09
2kliksphilip
Рет қаралды 11 М.
Pop Up Date Picker Android Studio Tutorial
5:39
Code With Cal
Рет қаралды 73 М.
RecyclerView | Everything You Need to Know
25:07
Practical Coding
Рет қаралды 132 М.
How to Respond to Different Situations in English
10:48
Learn English with Bob the Canadian
Рет қаралды 10 М.
How to Change App Icon in Android Studio | Beginner Tutorial
2:45
Code With Cal
Рет қаралды 76 М.
LEARN ENGLISH: At the restaurant conversation - Improve English Speaking Skills
10:35
Learn English with Tangerine Academy
Рет қаралды 2,9 М.
Черёмуха во рту вяжет
0:11
Pavlov_family_
Рет қаралды 1,4 МЛН
Советы на всё лето 4 @postworkllc
0:23
История одного вокалиста
Рет қаралды 4,2 МЛН
ДОМАШНИЙ ПВЗ @DetyaBoga
0:21
KINO KAIF
Рет қаралды 3 МЛН
Ném bóng coca-cola😂😂😂
0:31
Tippi Kids TV
Рет қаралды 5 МЛН