Android Firebase database: how to retrieve multiple rows? -


this database structure: json database

what trying do, fill listview elements in database, in custom layout 3 textview each line:

title

date

text


title

date

text


title

date

text

i tried custom adapter, extending firebaselistadapter<>,with class store data, can't solve problem.

can me, please?

firebasedatabase database = firebasedatabase.getinstance();         databasereference myref = database.getreference();         myref.addlistenerforsinglevalueevent(new valueeventlistener() {             @override             public void ondatachange(datasnapshot datasnapshot) {                 if (datasnapshot.haschildren()) {                     (datasnapshot datasnapshot1 : datasnapshot.getchildren()) {                      your_module_obj=   datasnapshot1.getvalue(your_module_class_name.class);                     }                 }             }         @override         public void oncancelled(databaseerror error) {             log.w("dd", "failed read value.", error.toexception());         }     }); 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

android - CoordinatorLayout, FAB and container layout conflict -