在Android中的orderbyvalue功能不起作用? [英] orderbyvalue fuction in android does not work?

查看:37
本文介绍了在Android中的orderbyvalue功能不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试按高分值进行排序,并且我搜索了以下示例:

解决方案

应该是这样的:

  highScoreRef.orderByValue().addChildEventListener(...){...} 

,或者如果您要先保存 Query 对象:

 查询查询= highScoreRef.orderByValue();query.addChildEventListener(...){...} 

I am trying to sort by highscore values and I have searched for examples like here: https://www.firebase.com/docs/android/guide/retrieving-data.html#section-queries

But still it doesn't work. I have tried to Log every step that I take but still no results. Please help me with this.

解决方案

It should be like this:

highScoreRef.orderByValue().addChildEventListener( ... ) { ... }

or if you want to save Query object first:

Query query = highScoreRef.orderByValue();
query.addChildEventListener( ... ) { ... }

这篇关于在Android中的orderbyvalue功能不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆