我创建了一个自定义日历,它使用从 github 链接https://github.com/DeveloperBrothers/Custom-Calendar-View获取的数组“HomeCollection” ,以便在我的 android 应用程序中创建自定义日历。目前,事件数据被硬编码到这个数组中(参见下面的代码片段),但希望从我的 firebase 数据库中获取事件属性,而不是在我创建数据库并保存此类事件数据的地方(参见下面的图片链接)。
HomeCollection.date_collection_arr = new ArrayList<HomeCollection>();
HomeCollection.date_collection_arr.add(new HomeCollection("2018-11-21", "Winter Table Quiz", "7-10 pm, Clubhouse", "ClubHouse", "Come along to the Winter Table Quiz, €5pp, tables of 4, theres lots of great prizes to be won."));
HomeCollection.date_collection_arr.add(new HomeCollection("2018-11-03", "u21 Division 1 Training ", "10-11am, Club Grounds", "ClubHouse", "Weekly Division 1 training. Weather dependant."));
HomeCollection.date_collection_arr.add(new HomeCollection("2018-11-03", "u21 Division 2 Training ", "11-12am, Club Grounds", "ClubHouse", "Weekly Division 2 training. Weather dependant."));
HomeCollection.date_collection_arr.add(new HomeCollection("2018-11-10", "u21 Division 1 Training ", "10-11am, Club Grounds", "ClubHouse", "Weekly Division 1 training. Weather dependant."));
HomeCollection.date_collection_arr.add(new HomeCollection("2018-11-10", "u21 Division 2 Training ", "11-12am, Club Grounds", "ClubHouse", "Weekly Division 2 training. Weather dependant."));
谁能帮我将此静态代码更改为我的 Firebase 数据库数据?
慕斯王
潇湘沐
相关分类