大佬教程收集整理的这篇文章主要介绍了在Android的FirestoreRecyclerAdapter中显示ServerValue.TIMESTAMP,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
该ServerValue.timestAMP当设置在火力地堡实时数据库的时间戳,而在云计算公司的FireStore(这是一个不同的产品),我们使用的是用于FieldValue.servertimestamp(),在此我的回答解释 。
我想在列表中显示服务器时间戳(实际上是日期)。在FirestoreRecyclerAdapter
由此类feeded(只保留时间戳相关的方法):
public class Lista {
private Long timestamp;
//private Map<String,String> timestamp;
public Lista() {
//empty constructor needed
}
public Lista(Long timestamp) {
this.timestamp = timestamp;
//this.timestamp = timestamp;
}
public java.util.Map<String,String> gettimestamp() {
return ServerValue.timestAMP;
}
@Exclude
public Long gettimestampLong() {
return timestamp;
}
}
的FirebaseListAdapter
用于填充一个ListView
存在于火力地堡实时数据库中使用的数据。
编辑1:
我忘记了这个问题:
有人在适配器中完成此操作吗?怎么解决呢?
以上是大佬教程为你收集整理的在Android的FirestoreRecyclerAdapter中显示ServerValue.TIMESTAMP全部内容,希望文章能够帮你解决在Android的FirestoreRecyclerAdapter中显示ServerValue.TIMESTAMP所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。