Firebase Android Studio- showing stored data on a calendar view -
i looking add scheduled events onto calendar view in app. @ moment have added data firebase database in table called 'schedule' 3 fields 'event_date, event_title , event_description'.
currently have created recyclerview display event title , event description. have included calendar view. aiming achieve when user opens page able select date display event due take place on date.
i not sure on how link these events calendar view. can please advise me on how correctly display information please. thanks.
protected void onstart() { super.onstart(); firebaserecycleradapter<events, schedule.scheduleviewer> firebaserecycleradapter = new firebaserecycleradapter<events, schedule.scheduleviewer>( events.class, r.layout.schedule_row, schedule.sc[enter image description here][1]heduleviewer.class, mdatabaseevent ) { @override protected void populateviewholder(schedule.scheduleviewer viewholder, events model, int position){ viewholder.settitle(model.getevent_title()); viewholder.setdesc(model.getevent_description()); // viewholder.setdate(model.getevent_date()); } }; meventlist.setadapter(firebaserecycleradapter); } public static class scheduleviewer extends recyclerview.viewholder{ view mview; public scheduleviewer(view itemview){ super(itemview); mview = itemview; } public void settitle(string event_title){ textview event_title = (textview) mview.findviewbyid(r.id.event_title); event_title.settext(event_title); } public void setdesc(string event_description){ textview event_desc = (textview) mview.findviewbyid(r.id.event_desc); event_desc.settext(event_description); } /*public void setdate(string event_date ){ calendarview event_date = (calendarview) mview.findviewbyid(r.id.event_date); event_date.setdate(event_date); }*/ }
Comments
Post a Comment